{
  "schemaVersion": 2,
  "title": "AdBuyMCP MCP tool and REST mapping contracts",
  "scope": {
    "product": "adbuymcp",
    "channels": [
      "ctv",
      "audio",
      "tv",
      "cinema",
      "dooh",
      "search",
      "social"
    ]
  },
  "scopeMeaning": "Deployment maximum; authenticated MCP tools/list can be narrower under signed customer entitlements.",
  "protocolVersion": "2026-07-28",
  "mcpPath": "/mcp",
  "toolNames": [
    "get_buyer_context",
    "list_buyer_sessions",
    "get_buyer_session",
    "list_creatives",
    "adapt_creative",
    "get_platform_info",
    "list_brand_lift_studies",
    "get_brand_lift_study",
    "get_brand_lift_study_catalogs",
    "get_brand_lift_results",
    "create_brand_lift_study",
    "update_brand_lift_study",
    "request_brand_lift_quote",
    "request_brand_lift_cancellation",
    "preview_brand_lift_study",
    "refresh_brand_lift_results",
    "create_brand_lift_draft",
    "launch_brand_lift_study",
    "list_identity_cohorts",
    "get_identity_cohort",
    "map_identity_cohort",
    "check_identity_optouts",
    "classify_postcodes",
    "forecast_search_performance",
    "list_agent_actions",
    "prepare_agent_action",
    "create_agent_mission",
    "list_agent_missions",
    "get_agent_mission",
    "start_agent_run",
    "list_agent_runs",
    "get_agent_run",
    "add_agent_step",
    "complete_agent_step",
    "request_agent_approval",
    "advance_agent_run",
    "raise_agent_exception",
    "list_agent_exceptions",
    "resolve_agent_exception",
    "resume_agent_run",
    "record_agent_decision",
    "record_agent_evidence",
    "finish_agent_run",
    "get_workspace_overview",
    "suggest_search_keywords",
    "get_plan_search_keywords",
    "set_plan_search_keywords",
    "get_brand_analytics",
    "list_personas",
    "extract_persona",
    "compile_persona",
    "browse_inventory",
    "generate_plan",
    "create_manual_plan",
    "list_plans",
    "get_plan",
    "update_plan_allocations",
    "approve_plan",
    "launch_campaign",
    "pause_campaign",
    "resume_campaign",
    "list_campaigns",
    "get_campaign",
    "get_campaign_readiness",
    "get_campaign_bookings",
    "request_campaign_booking",
    "list_campaign_conversion_goals",
    "set_campaign_conversion_goal",
    "list_live_execution_grants",
    "list_campaign_attempts",
    "get_campaign_dead_letters",
    "get_delivery",
    "get_measurement",
    "get_campaign_tracking",
    "set_campaign_tracking",
    "import_outcomes",
    "get_outcome_health",
    "get_campaign_report",
    "get_audit",
    "prove_it",
    "get_campaign_insights",
    "generate_optimizations",
    "list_optimizations",
    "approve_optimization",
    "reject_optimization",
    "mmm_readiness",
    "run_micro_mmm",
    "get_journeys",
    "sync_audience",
    "generate_creative",
    "upload_creative",
    "precheck_creative",
    "revise_creative",
    "set_campaign_creatives",
    "submit_creative",
    "get_asset_pricing",
    "produce_asset",
    "get_asset_status",
    "list_connections",
    "get_supplier_dossier",
    "set_connection",
    "get_billing_summary",
    "get_billing_statement",
    "get_topup_status",
    "top_up_wallet"
  ],
  "transport": {
    "supported": [
      "stdio",
      "streamable-http"
    ],
    "httpMethods": [
      "POST"
    ],
    "statefulSessions": false,
    "serverInitiatedEventStream": false,
    "eventSubscriptions": false,
    "responseDelivery": "Request-response; modern protocol responses may use SSE framing. Legacy HTTP returns JSON. Poll tools for campaign, booking, approval and asset state."
  },
  "coverage": "Every registered MCP tool. REST mappings describe requests produced by these tools; REST-only routes are outside this document.",
  "schemaLimitations": "JSON Schema describes structural validation. Runtime channel fit, ownership, canonical file bytes, per-kind duration, readiness, authority, and revision checks still apply. Output schemas are MCP envelopes unless they define nested fields; they are not a complete REST response model.",
  "authentication": {
    "publicMetadataOnly": true,
    "toolsRequireDeploymentAuthentication": true,
    "publicMultiTenant": "OAuth with tenant-, client-, product- and channel-bound API delegation; never a shared static bearer.",
    "approvals": "A bounded mandate does not replace exact human approval. Governed actions require both returned execution headers. Resolve approvals as a permitted human through the API/UI, then poll get_agent_run."
  },
  "errors": {
    "toolFailure": {
      "isError": true,
      "structuredContent": {
        "error": {
          "code": "stable machine code",
          "message": "human-readable explanation",
          "details": "optional context"
        }
      }
    },
    "recovery": "Read the error code and current resource state. Retry read-only requests after transient errors. Retain idempotency keys after uncertain writes; never infer failure, acceptance or released funds from a timeout. Ambiguous provider actions require human reconciliation."
  },
  "upload": {
    "maximumDecodedBytes": 20971520,
    "base64Encoding": "canonical RFC 4648 with padding"
  },
  "booking": {
    "confirmationWindowHours": 12,
    "supplierConfirmation": "human-only",
    "overdueIsAcceptance": false
  },
  "contracts": [
    {
      "name": "list_brand_lift_studies",
      "title": "List campaign brand-lift studies",
      "description": "Read a bounded page of campaign-owned study metadata. Supplier outcomes and financial settlement are separate.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "cursor": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "campaignId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "studies": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "sandbox",
                    "live"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "brief",
                    "quote-requested",
                    "quoted",
                    "purchase-approved",
                    "draft-submitting",
                    "provider-draft",
                    "launch-ready",
                    "launch-submitting",
                    "launch-acknowledged",
                    "collecting",
                    "results-available",
                    "provider-complete",
                    "closed-local",
                    "draft-delete-requested",
                    "draft-deleted",
                    "cancellation-requested",
                    "cancelled",
                    "reconciliation-required",
                    "failed"
                  ]
                },
                "revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 2147483647
                },
                "financialStatus": {
                  "type": "string",
                  "enum": [
                    "unfunded",
                    "reserved",
                    "partially-settled",
                    "settled",
                    "reconciliation-required"
                  ]
                },
                "providerStatus": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "required": [
                "id",
                "mode",
                "status",
                "revision",
                "financialStatus",
                "providerStatus",
                "createdAt",
                "name"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "studies",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/brand-lift-studies",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "cursor": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_brand_lift_study",
      "title": "Read a brand-lift study",
      "description": "Read tenant-owned study metadata or aggregate survey statistics. Sandbox evidence is modeled; provider sample sufficiency is not independently assessed power. Expired results are withheld.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "studyId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/brand-lift-studies/{studyId}",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_brand_lift_results",
      "title": "Read retained brand-lift results",
      "description": "Read tenant-owned study metadata or aggregate survey statistics. Sandbox evidence is modeled; provider sample sufficiency is not independently assessed power. Expired results are withheld.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "studyId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "result": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "adapterKey": {
                    "type": "string",
                    "const": "cint"
                  },
                  "evidenceSource": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "const": "survey-based"
                  },
                  "study": {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  "observedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unitsEffectiveFrom": {
                    "type": "string",
                    "const": "2026-09-01"
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "confidenceLevel": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 0.8
                          },
                          {
                            "type": "number",
                            "const": 0.85
                          },
                          {
                            "type": "number",
                            "const": 0.9
                          },
                          {
                            "type": "number",
                            "const": 0.95
                          }
                        ]
                      },
                      "targetAudience": {
                        "type": "string",
                        "enum": [
                          "all",
                          "campaign-default"
                        ]
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      }
                    },
                    "required": [
                      "confidenceLevel",
                      "targetAudience",
                      "channels"
                    ],
                    "additionalProperties": false
                  },
                  "questions": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "questionId": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 300
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "questionType": {
                          "type": "string",
                          "enum": [
                            "demographic",
                            "lift",
                            "extra",
                            "baseline",
                            "social",
                            "ots"
                          ]
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "inTargetAnswerIds": {
                          "maxItems": 1000,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "availability": {
                          "type": "string",
                          "enum": [
                            "available",
                            "insufficient-sample",
                            "unavailable"
                          ]
                        },
                        "providerEnoughSampleSize": {
                          "type": "boolean"
                        },
                        "independentlyAssessedPower": {
                          "type": "boolean",
                          "const": false
                        },
                        "sampleExposed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sampleControl": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sampleTotal": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "inTargetExposed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "inTargetControl": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "weightedExposedPercentage": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "weightedControlPercentage": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "liftPercentagePoints": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -100,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidenceLevel": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 0.8
                            },
                            {
                              "type": "number",
                              "const": 0.85
                            },
                            {
                              "type": "number",
                              "const": 0.9
                            },
                            {
                              "type": "number",
                              "const": 0.95
                            }
                          ]
                        },
                        "marginOfErrorPercentagePoints": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "statisticallySignificant": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enoughSampleOn": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "questionId",
                        "name",
                        "text",
                        "questionType",
                        "kpiType",
                        "inTargetAnswerIds",
                        "availability",
                        "providerEnoughSampleSize",
                        "independentlyAssessedPower",
                        "sampleExposed",
                        "sampleControl",
                        "sampleTotal",
                        "inTargetExposed",
                        "inTargetControl",
                        "weightedExposedPercentage",
                        "weightedControlPercentage",
                        "liftPercentagePoints",
                        "confidenceLevel",
                        "marginOfErrorPercentagePoints",
                        "statisticallySignificant",
                        "enoughSampleOn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "warnings": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  }
                },
                "required": [
                  "adapterKey",
                  "evidenceSource",
                  "label",
                  "study",
                  "observedAt",
                  "providerDataUpdatedAt",
                  "unitsEffectiveFrom",
                  "scope",
                  "questions",
                  "warnings"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "freshness": {
            "type": "string",
            "enum": [
              "not-collected",
              "expired",
              "stale",
              "recently-retrieved"
            ]
          },
          "retrievedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "providerDataUpdatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "retainUntil": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "result",
          "freshness",
          "retrievedAt",
          "providerDataUpdatedAt"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/brand-lift-studies/{studyId}/results",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_brand_lift_study_catalogs",
      "title": "Read campaign brand-lift study catalogs",
      "description": "Read supplier-reported or deterministic sandbox industries, country languages and explicitly scoped standard question templates. Select both catalog IDs to read templates. Catalog availability is not a quote, purchase approval or credentialed acceptance.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "mode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          },
          "countryLanguageId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "industryId": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "page": {
            "default": 1,
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "pageSize": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "campaignId",
          "mode"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "mode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "attemptId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "authority": {
            "type": "object",
            "properties": {
              "providerAccountId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "connectionRevision": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "configuredIdentityDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dossierRevision": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "dossierDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "providerAccountId",
              "connectionRevision",
              "configuredIdentityDigest",
              "dossierRevision",
              "dossierDigest"
            ],
            "additionalProperties": false
          },
          "evidenceSource": {
            "type": "string",
            "enum": [
              "provider-reported",
              "sandbox-modeled"
            ]
          },
          "industries": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "pageSize": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "totalItems": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "hasMore": {
                "type": "boolean"
              },
              "evidenceSource": {
                "type": "string",
                "enum": [
                  "provider-reported",
                  "sandbox-modeled"
                ]
              },
              "items": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": [
                    "id",
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "page",
              "pageSize",
              "totalItems",
              "hasMore",
              "evidenceSource",
              "items"
            ],
            "additionalProperties": false
          },
          "countryLanguages": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "pageSize": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 100
              },
              "totalItems": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "hasMore": {
                "type": "boolean"
              },
              "evidenceSource": {
                "type": "string",
                "enum": [
                  "provider-reported",
                  "sandbox-modeled"
                ]
              },
              "items": {
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "countryId": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "countryName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "languageId": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "languageName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "locale": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "channels": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "digital",
                          "linear_tv",
                          "social",
                          "forced_exposure"
                        ]
                      }
                    }
                  },
                  "required": [
                    "id",
                    "countryId",
                    "countryName",
                    "languageId",
                    "languageName",
                    "locale",
                    "channels"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "page",
              "pageSize",
              "totalItems",
              "hasMore",
              "evidenceSource",
              "items"
            ],
            "additionalProperties": false
          },
          "standardTemplates": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "evidenceSource": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "templates": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "questionTextTemplate": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "required": {
                          "type": "boolean"
                        },
                        "fields": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "defaultValue": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "label",
                              "defaultValue"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "supported": {
                          "type": "boolean"
                        },
                        "unsupportedReason": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 1000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "questionTextTemplate",
                        "required",
                        "fields",
                        "supported",
                        "unsupportedReason"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "evidenceSource",
                  "templates"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "templateScope": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "countryLanguageId",
                  "industryId"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "pricing": {
            "type": "string",
            "const": "supplier-quote-required"
          },
          "cancellation": {
            "type": "string",
            "const": "human-supplier-workflow-required"
          },
          "credentialedAcceptance": {
            "type": "boolean",
            "const": false
          }
        },
        "required": [
          "campaignId",
          "mode",
          "observedAt",
          "attemptId",
          "authority",
          "evidenceSource",
          "industries",
          "countryLanguages",
          "standardTemplates",
          "templateScope",
          "pricing",
          "cancellation",
          "credentialedAcceptance"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/brand-lift-study-catalogs",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "countryLanguageId": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "industryId": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "pageSize": {
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "mode"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "create_brand_lift_study",
      "title": "Create a brand-lift study brief",
      "description": "Create a local study brief from exact catalog template selections. Human supplier quote and purchase approval are separate steps.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          },
          "spec": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "advertiserName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "startDate": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "endDate": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "countryLanguageId": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "industryId": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "channels": {
                "minItems": 1,
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "digital",
                    "linear_tv",
                    "social"
                  ]
                }
              },
              "expectedImpressionsCount": {
                "type": "object",
                "properties": {
                  "digital": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "linear_tv": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "social": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              },
              "dataPartners": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "templateSelections": {
                "minItems": 2,
                "maxItems": 55,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "string",
                      "enum": [
                        "lift",
                        "baseline"
                      ]
                    },
                    "questionName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "kpiType": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "definitionDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "fieldValues": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "usage",
                    "questionName",
                    "kpiType",
                    "definitionDigest",
                    "order",
                    "fieldValues"
                  ],
                  "additionalProperties": false
                }
              },
              "brand": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "competitors": {
                "minItems": 2,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "allowIp": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "advertiserName",
              "startDate",
              "endDate",
              "countryLanguageId",
              "industryId",
              "channels",
              "expectedImpressionsCount",
              "dataPartners",
              "templateSelections",
              "brand",
              "competitors",
              "allowIp"
            ],
            "additionalProperties": false
          },
          "retainResultsUntil": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "mode",
          "spec",
          "retainResultsUntil",
          "campaignId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/brand-lift-studies",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.create",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "spec": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "advertiserName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "startDate": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "endDate": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "countryLanguageId": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "industryId": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "channels": {
                  "minItems": 1,
                  "maxItems": 3,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "digital",
                      "linear_tv",
                      "social"
                    ]
                  }
                },
                "expectedImpressionsCount": {
                  "type": "object",
                  "properties": {
                    "digital": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "linear_tv": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "social": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "dataPartners": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "templateSelections": {
                  "minItems": 2,
                  "maxItems": 55,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "string",
                        "enum": [
                          "lift",
                          "baseline"
                        ]
                      },
                      "questionName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "kpiType": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "order": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "fieldValues": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "usage",
                      "questionName",
                      "kpiType",
                      "definitionDigest",
                      "order",
                      "fieldValues"
                    ],
                    "additionalProperties": false
                  }
                },
                "brand": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "competitors": {
                  "minItems": 2,
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "allowIp": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "advertiserName",
                "startDate",
                "endDate",
                "countryLanguageId",
                "industryId",
                "channels",
                "expectedImpressionsCount",
                "dataPartners",
                "templateSelections",
                "brand",
                "competitors",
                "allowIp"
              ],
              "additionalProperties": false
            },
            "retainResultsUntil": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          "additionalProperties": false,
          "required": [
            "mode",
            "spec",
            "retainResultsUntil"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "update_brand_lift_study",
      "title": "Update a brand-lift study brief",
      "description": "Update an editable local brief at the reviewed revision. Existing human approvals cannot authorize a changed specification.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "spec": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "advertiserName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "startDate": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "endDate": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "countryLanguageId": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "industryId": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "channels": {
                "minItems": 1,
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "digital",
                    "linear_tv",
                    "social"
                  ]
                }
              },
              "expectedImpressionsCount": {
                "type": "object",
                "properties": {
                  "digital": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "linear_tv": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "social": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              },
              "dataPartners": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                }
              },
              "templateSelections": {
                "minItems": 2,
                "maxItems": 55,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "string",
                      "enum": [
                        "lift",
                        "baseline"
                      ]
                    },
                    "questionName": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "kpiType": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "definitionDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "fieldValues": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500
                          }
                        },
                        "required": [
                          "name",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "usage",
                    "questionName",
                    "kpiType",
                    "definitionDigest",
                    "order",
                    "fieldValues"
                  ],
                  "additionalProperties": false
                }
              },
              "brand": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "competitors": {
                "minItems": 2,
                "maxItems": 10,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "allowIp": {
                "type": "boolean"
              }
            },
            "required": [
              "name",
              "advertiserName",
              "startDate",
              "endDate",
              "countryLanguageId",
              "industryId",
              "channels",
              "expectedImpressionsCount",
              "dataPartners",
              "templateSelections",
              "brand",
              "competitors",
              "allowIp"
            ],
            "additionalProperties": false
          },
          "retainResultsUntil": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "spec",
          "retainResultsUntil",
          "expectedRevision",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/brand-lift-studies/{studyId}",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "spec": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "advertiserName": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "startDate": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "endDate": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "countryLanguageId": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "industryId": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "channels": {
                  "minItems": 1,
                  "maxItems": 3,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "digital",
                      "linear_tv",
                      "social"
                    ]
                  }
                },
                "expectedImpressionsCount": {
                  "type": "object",
                  "properties": {
                    "digital": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "linear_tv": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    "social": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                },
                "dataPartners": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "templateSelections": {
                  "minItems": 2,
                  "maxItems": 55,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "usage": {
                        "type": "string",
                        "enum": [
                          "lift",
                          "baseline"
                        ]
                      },
                      "questionName": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "kpiType": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "order": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "fieldValues": {
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": [
                            "name",
                            "value"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "usage",
                      "questionName",
                      "kpiType",
                      "definitionDigest",
                      "order",
                      "fieldValues"
                    ],
                    "additionalProperties": false
                  }
                },
                "brand": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "competitors": {
                  "minItems": 2,
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "allowIp": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "advertiserName",
                "startDate",
                "endDate",
                "countryLanguageId",
                "industryId",
                "channels",
                "expectedImpressionsCount",
                "dataPartners",
                "templateSelections",
                "brand",
                "competitors",
                "allowIp"
              ],
              "additionalProperties": false
            },
            "retainResultsUntil": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "additionalProperties": false,
          "required": [
            "spec",
            "retainResultsUntil",
            "expectedRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "request_brand_lift_quote",
      "title": "Request a supplier study quote",
      "description": "Record a local task for a human to obtain and record the supplier quote. This does not establish a price or buy a study.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/quote-request",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.quote.request",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "request_brand_lift_cancellation",
      "title": "Request supplier study cancellation",
      "description": "Record a human supplier cancellation task. This does not confirm cancellation or release funds.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/cancellation-request",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.cancellation.request",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "preview_brand_lift_study",
      "title": "Preview the exact study questions",
      "description": "Read current supplier catalog templates and record a bounded question preview and request digest. The provider-native draft remains private. Requires study.preview authority.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          },
          "attemptId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "studyRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "preview": {
            "type": "object",
            "properties": {
              "questions": {
                "maxItems": 55,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "usage": {
                      "type": "string",
                      "enum": [
                        "lift",
                        "baseline"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    "kpiType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10000
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "answers": {
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 500
                      }
                    }
                  },
                  "required": [
                    "usage",
                    "name",
                    "kpiType",
                    "text",
                    "order",
                    "answers"
                  ],
                  "additionalProperties": false
                }
              },
              "providerRequestDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "questions",
              "providerRequestDigest",
              "specDigest"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed",
          "attemptId",
          "studyRevision",
          "preview"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/preview",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.preview",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "refresh_brand_lift_results",
      "title": "Refresh aggregate brand-lift results",
      "description": "Read the known launched provider study under reviewed authority and retain aggregate survey results. A parked read requires a human operator; retryParked must be false.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "confidenceLevel": {
            "anyOf": [
              {
                "type": "number",
                "const": 0.8
              },
              {
                "type": "number",
                "const": 0.85
              },
              {
                "type": "number",
                "const": 0.9
              },
              {
                "type": "number",
                "const": 0.95
              }
            ]
          },
          "targetAudience": {
            "type": "string",
            "enum": [
              "all",
              "campaign-default"
            ]
          },
          "retryParked": {
            "default": false,
            "type": "boolean",
            "const": false
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "confidenceLevel",
          "targetAudience",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          },
          "attemptId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "result": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "adapterKey": {
                    "type": "string",
                    "const": "cint"
                  },
                  "evidenceSource": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "const": "survey-based"
                  },
                  "study": {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  "observedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unitsEffectiveFrom": {
                    "type": "string",
                    "const": "2026-09-01"
                  },
                  "scope": {
                    "type": "object",
                    "properties": {
                      "confidenceLevel": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 0.8
                          },
                          {
                            "type": "number",
                            "const": 0.85
                          },
                          {
                            "type": "number",
                            "const": 0.9
                          },
                          {
                            "type": "number",
                            "const": 0.95
                          }
                        ]
                      },
                      "targetAudience": {
                        "type": "string",
                        "enum": [
                          "all",
                          "campaign-default"
                        ]
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      }
                    },
                    "required": [
                      "confidenceLevel",
                      "targetAudience",
                      "channels"
                    ],
                    "additionalProperties": false
                  },
                  "questions": {
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "questionId": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 300
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "questionType": {
                          "type": "string",
                          "enum": [
                            "demographic",
                            "lift",
                            "extra",
                            "baseline",
                            "social",
                            "ots"
                          ]
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "inTargetAnswerIds": {
                          "maxItems": 1000,
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "availability": {
                          "type": "string",
                          "enum": [
                            "available",
                            "insufficient-sample",
                            "unavailable"
                          ]
                        },
                        "providerEnoughSampleSize": {
                          "type": "boolean"
                        },
                        "independentlyAssessedPower": {
                          "type": "boolean",
                          "const": false
                        },
                        "sampleExposed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sampleControl": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sampleTotal": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "inTargetExposed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "inTargetControl": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "weightedExposedPercentage": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "weightedControlPercentage": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "liftPercentagePoints": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -100,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "confidenceLevel": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 0.8
                            },
                            {
                              "type": "number",
                              "const": 0.85
                            },
                            {
                              "type": "number",
                              "const": 0.9
                            },
                            {
                              "type": "number",
                              "const": 0.95
                            }
                          ]
                        },
                        "marginOfErrorPercentagePoints": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "statisticallySignificant": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "enoughSampleOn": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        }
                      },
                      "required": [
                        "questionId",
                        "name",
                        "text",
                        "questionType",
                        "kpiType",
                        "inTargetAnswerIds",
                        "availability",
                        "providerEnoughSampleSize",
                        "independentlyAssessedPower",
                        "sampleExposed",
                        "sampleControl",
                        "sampleTotal",
                        "inTargetExposed",
                        "inTargetControl",
                        "weightedExposedPercentage",
                        "weightedControlPercentage",
                        "liftPercentagePoints",
                        "confidenceLevel",
                        "marginOfErrorPercentagePoints",
                        "statisticallySignificant",
                        "enoughSampleOn"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "warnings": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  }
                },
                "required": [
                  "adapterKey",
                  "evidenceSource",
                  "label",
                  "study",
                  "observedAt",
                  "providerDataUpdatedAt",
                  "unitsEffectiveFrom",
                  "scope",
                  "questions",
                  "warnings"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "freshness": {
            "type": "string",
            "enum": [
              "not-collected",
              "expired",
              "stale",
              "recently-retrieved"
            ]
          },
          "retrievedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "providerDataUpdatedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "retainUntil": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed",
          "attemptId",
          "result",
          "freshness",
          "retrievedAt",
          "providerDataUpdatedAt"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/results/refresh",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.results.refresh",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            },
            "confidenceLevel": {
              "anyOf": [
                {
                  "type": "number",
                  "const": 0.8
                },
                {
                  "type": "number",
                  "const": 0.85
                },
                {
                  "type": "number",
                  "const": 0.9
                },
                {
                  "type": "number",
                  "const": 0.95
                }
              ]
            },
            "targetAudience": {
              "type": "string",
              "enum": [
                "all",
                "campaign-default"
              ]
            },
            "retryParked": {
              "default": false,
              "type": "boolean",
              "const": false
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision",
            "confidenceLevel",
            "targetAudience"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "create_brand_lift_draft",
      "title": "Create an approved supplier study draft",
      "description": "Execute the exact unused human draft approval for the already-funded study. Declare the full GBP cap under study-commitment in agent approval; incremental reservation is zero. An uncertain supplier write requires human reconciliation.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "expectedConnectionRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "quoteId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "approvalId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "expectedConnectionRevision",
          "quoteId",
          "approvalId",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          },
          "attemptId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed",
          "attemptId"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/draft",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.draft",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            },
            "expectedConnectionRevision": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                {
                  "type": "null"
                }
              ]
            },
            "quoteId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "approvalId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision",
            "expectedConnectionRevision",
            "quoteId",
            "approvalId"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "launch_brand_lift_study",
      "title": "Launch an approved supplier study",
      "description": "Execute the exact unused human launch approval, current tracking evidence and approved provider definition. Agent approval must disclose the full already-funded GBP cap. An uncertain launch requires human reconciliation.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 2147483647
          },
          "expectedConnectionRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 2147483647
              },
              {
                "type": "null"
              }
            ]
          },
          "quoteId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "approvalId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "studyId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "durable UUID; retain this exact key if the outcome is uncertain"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "expectedRevision",
          "expectedConnectionRevision",
          "quoteId",
          "approvalId",
          "studyId",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "study": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "campaignId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 2147483647
              },
              "status": {
                "type": "string",
                "enum": [
                  "brief",
                  "quote-requested",
                  "quoted",
                  "purchase-approved",
                  "draft-submitting",
                  "provider-draft",
                  "launch-ready",
                  "launch-submitting",
                  "launch-acknowledged",
                  "collecting",
                  "results-available",
                  "provider-complete",
                  "closed-local",
                  "draft-delete-requested",
                  "draft-deleted",
                  "cancellation-requested",
                  "cancelled",
                  "reconciliation-required",
                  "failed"
                ]
              },
              "spec": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "advertiserName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "endDate": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "countryLanguageId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "industryId": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "digital",
                        "linear_tv",
                        "social"
                      ]
                    }
                  },
                  "expectedImpressionsCount": {
                    "type": "object",
                    "properties": {
                      "digital": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "linear_tv": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "social": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "additionalProperties": false
                  },
                  "dataPartners": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "templateSelections": {
                    "minItems": 2,
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "questionName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "definitionDigest": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "fieldValues": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              }
                            },
                            "required": [
                              "name",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "questionName",
                        "kpiType",
                        "definitionDigest",
                        "order",
                        "fieldValues"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "brand": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "competitors": {
                    "minItems": 2,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    }
                  },
                  "allowIp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "advertiserName",
                  "startDate",
                  "endDate",
                  "countryLanguageId",
                  "industryId",
                  "channels",
                  "expectedImpressionsCount",
                  "dataPartners",
                  "templateSelections",
                  "brand",
                  "competitors",
                  "allowIp"
                ],
                "additionalProperties": false
              },
              "specDigest": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "selectedQuoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerAccountId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStudyId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerStatus": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerDefinitionDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "provider": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "studyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "accountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 300
                      },
                      "advertiserName": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "status": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "startDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "countryLanguageId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "industryId": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "channels": {
                        "maxItems": 4,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social",
                            "forced_exposure"
                          ]
                        }
                      },
                      "permissionId": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "providerDataUpdatedAt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "definitionDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "evidenceSource": {
                        "type": "string",
                        "enum": [
                          "provider-reported",
                          "sandbox-modeled"
                        ]
                      },
                      "configurationDigest": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "studyId",
                      "accountId",
                      "name",
                      "advertiserName",
                      "status",
                      "startDate",
                      "endDate",
                      "countryLanguageId",
                      "industryId",
                      "channels",
                      "permissionId",
                      "providerUpdatedAt",
                      "providerDataUpdatedAt",
                      "definitionDigest",
                      "evidenceSource",
                      "configurationDigest"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "providerConfigurationDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "providerAccountId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "providerStudyId": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      "channels": {
                        "minItems": 1,
                        "maxItems": 3,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "digital",
                            "linear_tv",
                            "social"
                          ]
                        }
                      },
                      "placements": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "channel": {
                              "type": "string",
                              "enum": [
                                "digital",
                                "linear_tv",
                                "social"
                              ]
                            },
                            "campaignLineIds": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              }
                            },
                            "method": {
                              "type": "string",
                              "enum": [
                                "provider-confirmed-s2s",
                                "provider-approved-pixel",
                                "provider-approved-data-partner",
                                "sandbox-fixture"
                              ]
                            },
                            "installationEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "supplierAcceptanceEvidence": {
                              "type": "object",
                              "properties": {
                                "artifactId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                }
                              },
                              "required": [
                                "artifactId",
                                "sha256"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "channel",
                            "campaignLineIds",
                            "method",
                            "installationEvidence",
                            "supplierAcceptanceEvidence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "provenance": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string",
                            "enum": [
                              "operator-attested",
                              "sandbox-fixture"
                            ]
                          },
                          "assertedBy": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "assertedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          }
                        },
                        "required": [
                          "source",
                          "assertedBy",
                          "assertedAt"
                        ],
                        "additionalProperties": false
                      },
                      "installedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "validUntil": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      "privacy": {
                        "type": "object",
                        "properties": {
                          "lawfulBasis": {
                            "type": "string",
                            "const": "consent"
                          },
                          "purpose": {
                            "type": "string",
                            "const": "brand-lift-measurement"
                          },
                          "noticeEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "consentEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "processingTermsEvidence": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              }
                            },
                            "required": [
                              "artifactId",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "obtainedAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                          },
                          "includesMeasurementSharing": {
                            "type": "boolean",
                            "const": true
                          },
                          "includesIp": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "lawfulBasis",
                          "purpose",
                          "noticeEvidence",
                          "consentEvidence",
                          "processingTermsEvidence",
                          "obtainedAt",
                          "expiresAt",
                          "includesMeasurementSharing",
                          "includesIp"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "providerAccountId",
                      "providerStudyId",
                      "channels",
                      "placements",
                      "provenance",
                      "installedAt",
                      "validUntil",
                      "privacy"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trackingDigest": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "supplierCommittedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cancellationRequestedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "retainResultsUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "campaignLines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "ctv",
                        "audio",
                        "tv",
                        "cinema",
                        "dooh",
                        "search",
                        "social"
                      ]
                    },
                    "adapterKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "adapterKey"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "campaignId",
              "mode",
              "revision",
              "status",
              "spec",
              "specDigest",
              "selectedQuoteId",
              "providerAccountId",
              "providerStudyId",
              "providerStatus",
              "providerDefinitionDigest",
              "provider",
              "providerConfigurationDigest",
              "tracking",
              "trackingDigest",
              "supplierCommittedAt",
              "cancellationRequestedAt",
              "retainResultsUntil",
              "createdAt",
              "updatedAt",
              "campaignLines"
            ],
            "additionalProperties": false
          },
          "surveyPreview": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "questions": {
                    "maxItems": 55,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "usage": {
                          "type": "string",
                          "enum": [
                            "lift",
                            "baseline"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "kpiType": {
                          "anyOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "text": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 10000
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "answers": {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 500
                          }
                        }
                      },
                      "required": [
                        "usage",
                        "name",
                        "kpiType",
                        "text",
                        "order",
                        "answers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "providerRequestDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "specDigest": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "questions",
                  "providerRequestDigest",
                  "specDigest"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quotes": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "enum": [
                        "operator-recorded-supplier-quote",
                        "sandbox-fixture"
                      ]
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "issuedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "supplier": {
                      "type": "object",
                      "properties": {
                        "quoteReference": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$"
                        },
                        "evidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "contractEvidence": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCancellationLiabilityMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "billingTrigger": {
                          "type": "string",
                          "enum": [
                            "order-acceptance",
                            "draft-creation",
                            "tracking-setup",
                            "launch",
                            "invoice"
                          ]
                        },
                        "includedScope": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "quoteReference",
                        "evidence",
                        "contractEvidence",
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumLiabilityMinor",
                        "maximumCancellationLiabilityMinor",
                        "billingTrigger",
                        "includedScope"
                      ],
                      "additionalProperties": false
                    },
                    "customer": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "const": "GBP"
                        },
                        "subtotalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "taxMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "totalMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "maximumCommitmentMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "cancellationMaximumMinor": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        "refundTerms": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        }
                      },
                      "required": [
                        "currency",
                        "subtotalMinor",
                        "taxMinor",
                        "totalMinor",
                        "maximumCommitmentMinor",
                        "cancellationMaximumMinor",
                        "refundTerms"
                      ],
                      "additionalProperties": false
                    },
                    "foreignCurrencyCoverageEvidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            "sha256": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "artifactId",
                            "sha256"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "source",
                    "specDigest",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "issuedAt",
                    "expiresAt",
                    "supplier",
                    "customer",
                    "foreignCurrencyCoverageEvidence"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "content",
                "contentDigest",
                "recordedAt"
              ],
              "additionalProperties": false
            }
          },
          "approvals": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "purpose": {
                  "type": "string",
                  "enum": [
                    "purchase",
                    "draft",
                    "launch",
                    "draft-delete"
                  ]
                },
                "content": {
                  "type": "object",
                  "properties": {
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "purpose": {
                      "type": "string",
                      "enum": [
                        "purchase",
                        "draft",
                        "launch",
                        "draft-delete"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "sandbox",
                        "live"
                      ]
                    },
                    "studyRevision": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 2147483647
                    },
                    "specDigest": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "trackingDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerDefinitionDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerRequestDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerStudyId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "providerAccountId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "connectionRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "configuredIdentityDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierRevision": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dossierDigest": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "maximumCommitmentMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "incrementalReservationMinor": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2147483647
                    },
                    "approvedBy": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "approvedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    }
                  },
                  "required": [
                    "studyId",
                    "quoteId",
                    "purpose",
                    "mode",
                    "studyRevision",
                    "specDigest",
                    "trackingDigest",
                    "providerDefinitionDigest",
                    "providerRequestDigest",
                    "providerStudyId",
                    "providerAccountId",
                    "connectionRevision",
                    "configuredIdentityDigest",
                    "dossierRevision",
                    "dossierDigest",
                    "currency",
                    "maximumCommitmentMinor",
                    "incrementalReservationMinor",
                    "approvedBy",
                    "approvedAt",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                },
                "contentDigest": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "approvedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "consumedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "purpose",
                "content",
                "contentDigest",
                "approvedAt",
                "expiresAt",
                "consumedAt"
              ],
              "additionalProperties": false
            }
          },
          "attempts": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "catalog-read",
                    "study-read",
                    "results-read",
                    "create-draft",
                    "launch",
                    "delete-draft"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "reconciliation-required"
                  ]
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resolvedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "startedAt",
                "settledAt",
                "errorCode",
                "resolvedAt"
              ],
              "additionalProperties": false
            }
          },
          "financial": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "GBP"
              },
              "financialStatus": {
                "type": "string",
                "enum": [
                  "unfunded",
                  "reserved",
                  "partially-settled",
                  "settled",
                  "reconciliation-required"
                ]
              },
              "quoteId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maximumCommitmentMinor": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "heldMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "chargesMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "creditsMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "netChargedMinor": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "lines": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "advertiserId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "studyId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "quoteId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "charge",
                        "credit"
                      ]
                    },
                    "amountMinor": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "settlementKey": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "originalSettlementKey": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000
                    },
                    "evidence": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "artifactId",
                        "sha256"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "ts",
                    "advertiserId",
                    "studyId",
                    "quoteId",
                    "currency",
                    "kind",
                    "amountMinor",
                    "settlementKey",
                    "originalSettlementKey",
                    "description",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "currency",
              "financialStatus",
              "quoteId",
              "maximumCommitmentMinor",
              "heldMinor",
              "chargesMinor",
              "creditsMinor",
              "netChargedMinor",
              "lines"
            ],
            "additionalProperties": false
          },
          "latestResult": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "provider-reported",
                      "sandbox-modeled"
                    ]
                  },
                  "retrievedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "providerDataUpdatedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "retainUntil": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "erasedAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "source",
                  "retrievedAt",
                  "providerDataUpdatedAt",
                  "retainUntil",
                  "erasedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resultPolling": {
            "type": "object",
            "properties": {
              "parked": {
                "type": "boolean"
              },
              "consecutiveFailures": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "nextPollAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastPolledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "parked",
              "consecutiveFailures",
              "nextPollAt",
              "lastPolledAt"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "replayed": {
            "type": "boolean"
          },
          "attemptId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "study",
          "surveyPreview",
          "quotes",
          "approvals",
          "attempts",
          "financial",
          "latestResult",
          "resultPolling",
          "note",
          "replayed",
          "attemptId"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/brand-lift-studies/{studyId}/launch",
        "pathFields": [
          "studyId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "studyId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "studyId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "study.launch",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 2147483647
            },
            "expectedConnectionRevision": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                {
                  "type": "null"
                }
              ]
            },
            "quoteId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "approvalId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision",
            "expectedConnectionRevision",
            "quoteId",
            "approvalId"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_buyer_context",
      "title": "Recover buyer evidence and next actions",
      "description": "Start or resume one of four buying workflows. Reads scoped resource evidence, missing inputs, human handoffs and exact canonical next-tool arguments. Does not launch, spend, generate assets or approve actions.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "workflow": {
            "type": "string",
            "enum": [
              "brief_to_plan",
              "creative_direction",
              "campaign_review",
              "launch_assistance"
            ]
          },
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "planId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "personaId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "creativeId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "workflow"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/buyer/context",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "workflow": {
              "type": "string",
              "enum": [
                "brief_to_plan",
                "creative_direction",
                "campaign_review",
                "launch_assistance"
              ]
            },
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "planId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "personaId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "creativeId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "workflow"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_buyer_sessions",
      "title": "List this agent’s buyer conversations",
      "description": "Read compact summaries of persisted buyer sessions belonging to this authenticated agent client, tenant and product scope. Use get_buyer_session to recover a selected conversation.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/buyer/sessions",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_buyer_session",
      "title": "Recover a buyer conversation",
      "description": "Read one agent-owned buyer conversation, its references, messages and current revision. A conversation is not commercial authority; existing Operator approvals still govern consequential actions.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "sessionId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/buyer/sessions/{sessionId}",
        "pathFields": [
          "sessionId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "additionalProperties": false,
          "required": [
            "sessionId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_creatives",
      "title": "List existing campaign creatives",
      "description": "Read the advertiser’s creatives, optionally for a campaign, so creative direction can reuse current work and inspect its channel and precheck evidence.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/creatives",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "adapt_creative",
      "title": "Adapt creative for another permitted channel",
      "description": "Generate a new channel-specific creative and copy precheck from an existing concept, preserving the source. Does not render paid assets, submit to a supplier or launch media. Review the result and use separately governed tools for those actions.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "targetChannel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ]
          },
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "creativeId",
          "targetChannel"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/{creativeId}/adapt",
        "pathFields": [
          "creativeId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "creativeId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "targetChannel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            },
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "targetChannel"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_platform_info",
      "title": "Get product identity and connection information",
      "description": "Read the trusted API product profile, supported channels and configured MCP connection metadata. A configured public URL is connection information, not proof of live supplier acceptance or production readiness. Use the advertised capabilitiesUrl for complete product tool contracts; do not invent a hosted endpoint when it is absent.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "product": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "adbuymcp",
                  "doohmcp",
                  "ctvmcp"
                ]
              },
              "channels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "channels"
            ],
            "additionalProperties": {}
          },
          "mcp": {
            "type": "object",
            "properties": {
              "http": {
                "type": "string"
              },
              "stdio": {
                "type": "string"
              },
              "access": {
                "type": "string",
                "enum": [
                  "hosted-oauth",
                  "local-development",
                  "not-configured"
                ]
              },
              "capabilitiesUrl": {
                "type": "string"
              }
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "name",
          "version",
          "channels",
          "product",
          "mcp"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/meta",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_agent_actions",
      "title": "List governed agent action contracts",
      "description": "List every consequential MCP action AdBuyMCP can execute, with its stable action name, REST route, exact parameter contract and budget policy. Read this before requesting an external-action approval. New mutation routes fail closed until they appear in this registry.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "actions"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/actions",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "prepare_agent_action",
      "title": "Prepare an exact action for human approval",
      "description": "Canonicalize one registered consequential action before requesting approval. Pass REST-level parameters from list_agent_actions and explicit integer-minor-unit authority. The API returns the exact privacy-safe action object plus its SHA-256 digest. Use that action unchanged with request_agent_approval, then as the execute-step input. Credentials and large outcome batches are represented by fingerprints rather than copied into the durable approval journal. This tool has no side effect.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "study.create",
              "study.update",
              "study.quote.request",
              "study.cancellation.request",
              "study.preview",
              "study.results.refresh",
              "study.draft",
              "study.launch",
              "data.identity.map",
              "data.identity.optout",
              "data.postcodes.classify",
              "plan.update",
              "plan.search-keywords.update",
              "plan.approve",
              "campaign.launch",
              "campaign.booking.request",
              "campaign.pause",
              "campaign.resume",
              "campaign.tracking.update",
              "campaign.conversion-goal.update",
              "outcome.import",
              "optimization.approve",
              "optimization.reject",
              "audience.sync",
              "campaign.creatives.update",
              "creative.submit",
              "asset.submit",
              "connection.update",
              "billing.topup"
            ],
            "description": "stable name from list_agent_actions"
          },
          "parameters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "REST-level path ids and request body fields from the listed contract"
          },
          "budgetMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1900000000,
            "description": "exact authority in minor units; zero for non-spend actions"
          },
          "currency": {
            "type": "string",
            "enum": [
              "GBP",
              "USD",
              "EUR"
            ],
            "description": "authority currency; currently GBP for executable routes"
          }
        },
        "required": [
          "name",
          "parameters",
          "budgetMinor",
          "currency"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "action": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "actionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "action",
          "actionDigest"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/actions/prepare",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "enum": [
                "study.create",
                "study.update",
                "study.quote.request",
                "study.cancellation.request",
                "study.preview",
                "study.results.refresh",
                "study.draft",
                "study.launch",
                "data.identity.map",
                "data.identity.optout",
                "data.postcodes.classify",
                "plan.update",
                "plan.search-keywords.update",
                "plan.approve",
                "campaign.launch",
                "campaign.booking.request",
                "campaign.pause",
                "campaign.resume",
                "campaign.tracking.update",
                "campaign.conversion-goal.update",
                "outcome.import",
                "optimization.approve",
                "optimization.reject",
                "audience.sync",
                "campaign.creatives.update",
                "creative.submit",
                "asset.submit",
                "connection.update",
                "billing.topup"
              ],
              "description": "stable name from list_agent_actions"
            },
            "parameters": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {},
              "description": "REST-level path ids and request body fields from the listed contract"
            },
            "budgetMinor": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1900000000,
              "description": "exact authority in minor units; zero for non-spend actions"
            },
            "currency": {
              "type": "string",
              "enum": [
                "GBP",
                "USD",
                "EUR"
              ],
              "description": "authority currency; currently GBP for executable routes"
            }
          },
          "additionalProperties": false,
          "required": [
            "name",
            "parameters",
            "budgetMinor",
            "currency"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "create_agent_mission",
      "title": "Create an agent mission and mandate",
      "description": "Create a durable mission with explicit objectives, success criteria and an initial authority mandate. Observe/recommend mandates cannot carry money authority. An execute mandate requires an explicit action allowlist, integer-minor-unit budget ceiling and currency. This stores authority only: it does not start a run, call a provider or spend money. Show an execute mandate to the user and obtain explicit approval before creating it.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "objectives": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "successCriteria": {
                  "minItems": 1,
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              },
              "required": [
                "description",
                "successCriteria"
              ]
            }
          },
          "mandate": {
            "default": {
              "mode": "observe",
              "allowedActions": []
            },
            "type": "object",
            "properties": {
              "mode": {
                "default": "observe",
                "type": "string",
                "enum": [
                  "observe",
                  "recommend",
                  "execute"
                ]
              },
              "allowedActions": {
                "default": [],
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                }
              },
              "maxBudgetMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1900000000
              },
              "currency": {
                "type": "string",
                "enum": [
                  "GBP",
                  "USD",
                  "EUR"
                ]
              },
              "validUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            }
          }
        },
        "required": [
          "title",
          "objectives"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "mission": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "mission"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/missions",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "objectives": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "successCriteria": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  }
                },
                "required": [
                  "description",
                  "successCriteria"
                ]
              }
            },
            "mandate": {
              "default": {
                "mode": "observe",
                "allowedActions": []
              },
              "type": "object",
              "properties": {
                "mode": {
                  "default": "observe",
                  "type": "string",
                  "enum": [
                    "observe",
                    "recommend",
                    "execute"
                  ]
                },
                "allowedActions": {
                  "default": [],
                  "maxItems": 50,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                  }
                },
                "maxBudgetMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1900000000
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "GBP",
                    "USD",
                    "EUR"
                  ]
                },
                "validUntil": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "title",
            "objectives"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_agent_missions",
      "title": "List agent missions",
      "description": "List tenant-scoped durable agent missions newest first, including objectives, mandate versions and counts of runs, approvals, exceptions, decisions and evidence. Use this to find an existing mission before creating another one.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "completed",
              "cancelled"
            ]
          },
          "limit": {
            "description": "page size; API default 50",
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "offset": {
            "description": "rows to skip; API default 0",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "missions": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "missions"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/missions",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "active",
                "completed",
                "cancelled"
              ]
            },
            "limit": {
              "description": "page size; API default 50",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "offset": {
              "description": "rows to skip; API default 0",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_agent_mission",
      "title": "Get an agent mission",
      "description": "Read one tenant-scoped mission with its ordered objectives, mandate history, active run id and control-record counts. This is the authoritative mission state; it is not evidence that any campaign or provider action has occurred.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "missionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "agent mission id"
          }
        },
        "required": [
          "missionId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "mission": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "mission"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/missions/{missionId}",
        "pathFields": [
          "missionId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "missionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "agent mission id"
            }
          },
          "additionalProperties": false,
          "required": [
            "missionId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "start_agent_run",
      "title": "Start an agent run",
      "description": "Start the single active run allowed for a mission, bound immutably to one active mandate version. Omit mandateId to bind the newest active mandate. The run begins in observe phase. Starting it does not execute tools, contact providers or grant authority beyond the bound mandate.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "missionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "active mission id"
          },
          "mandateId": {
            "description": "specific active mandate; defaults to the newest active version",
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "missionId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/missions/{missionId}/runs",
        "pathFields": [
          "missionId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "missionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "active mission id"
            }
          },
          "additionalProperties": false,
          "required": [
            "missionId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "mandateId": {
              "description": "specific active mandate; defaults to the newest active version",
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_agent_runs",
      "title": "List runs for an agent mission",
      "description": "List tenant-scoped runs for one mission newest first, including their bound mandate and durable control-record counts. Filter by state when looking for work waiting on approval or blocked by an exception.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "missionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "owning mission id"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "waiting_approval",
              "blocked",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "limit": {
            "description": "page size; API default 50",
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "offset": {
            "description": "rows to skip; API default 0",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "missionId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runs": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "runs"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/missions/{missionId}/runs",
        "pathFields": [
          "missionId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "missionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "owning mission id"
            }
          },
          "additionalProperties": false,
          "required": [
            "missionId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "running",
                "waiting_approval",
                "blocked",
                "succeeded",
                "failed",
                "cancelled"
              ]
            },
            "limit": {
              "description": "page size; API default 50",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "offset": {
              "description": "rows to skip; API default 0",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_agent_run",
      "title": "Get an agent run and its control record",
      "description": "Read a run with its mission, bound mandate, ordered steps, approvals, exceptions, decisions and evidence. detailLimit applies independently to each child collection and counts reveal truncation. Inspect this immediately before any state transition to avoid acting on stale phase or authority.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "agent run id"
          },
          "detailLimit": {
            "description": "maximum rows per child collection; API default 100",
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          }
        },
        "required": [
          "runId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/runs/{runId}",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "agent run id"
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "detailLimit": {
              "description": "maximum rows per child collection; API default 100",
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "add_agent_step",
      "title": "Add a pending step to an agent run",
      "description": "Record one pending step in the run’s current phase using optimistic expectedPhase. A non-other kind must match the phase. An EXECUTE step must carry the approved external action’s approvalId and exact actionDigest; recording it atomically consumes that approval so it cannot authorize a second action. CRITICAL: this tool only records the step and consumes authority. It does not call an AdBuyMCP execution tool or any provider. Call the governed tool separately with its agentAuthorization; the API claims and settles the execute step from the real route receipt.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedPhase": {
            "type": "string",
            "enum": [
              "observe",
              "plan",
              "approve",
              "execute",
              "verify"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "observe",
              "plan",
              "approve",
              "execute",
              "verify",
              "other"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "input": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "approvalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "runId",
          "expectedPhase",
          "kind",
          "label"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "step": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "step"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/steps",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedPhase": {
              "type": "string",
              "enum": [
                "observe",
                "plan",
                "approve",
                "execute",
                "verify"
              ]
            },
            "kind": {
              "type": "string",
              "enum": [
                "observe",
                "plan",
                "approve",
                "execute",
                "verify",
                "other"
              ]
            },
            "label": {
              "type": "string",
              "minLength": 1,
              "maxLength": 240
            },
            "input": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "approvalId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "expectedActionDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedPhase",
            "kind",
            "label"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "complete_agent_step",
      "title": "Complete or fail a non-execute agent step",
      "description": "Settle one pending non-execute step exactly once. A completed step may carry structured output; a failed step must carry an error and blocks the run. Execute steps reject this endpoint: they are atomically claimed and settled only by the governed AdBuyMCP route that performs the approved action.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed"
            ]
          },
          "output": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "error": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "stepId",
          "status"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "step": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "step"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/steps/{stepId}/complete",
        "pathFields": [
          "stepId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "stepId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "stepId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "completed",
                "failed"
              ]
            },
            "output": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "error": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            }
          },
          "additionalProperties": false,
          "required": [
            "status"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "request_agent_approval",
      "title": "Request approval for an agent action",
      "description": "Create a pending approval and move an unblocked run to waiting_approval. An external_action can only be requested in approve phase and must fit the run’s active execute mandate, including its allowlisted action name and explicit budgetMinor/currency (use zero for non-spend actions). The response returns the canonical actionDigest. This requests authority; it does not grant or execute it. An MCP identity cannot approve its own request: direct the user to the Operator approval queue, then poll get_agent_run until the approval is approved or rejected.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "kind": {
            "type": "string",
            "enum": [
              "external_action",
              "policy",
              "creative",
              "measurement",
              "other"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "action": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120,
                "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
              },
              "parameters": {
                "default": {},
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "budgetMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1900000000
              },
              "currency": {
                "type": "string",
                "enum": [
                  "GBP",
                  "USD",
                  "EUR"
                ]
              }
            },
            "required": [
              "name"
            ]
          },
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "runId",
          "kind",
          "reason",
          "action"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "approval": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "approval"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/approvals",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "external_action",
                "policy",
                "creative",
                "measurement",
                "other"
              ]
            },
            "reason": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            },
            "action": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "parameters": {
                  "default": {},
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "budgetMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1900000000
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "GBP",
                    "USD",
                    "EUR"
                  ]
                }
              },
              "required": [
                "name"
              ]
            },
            "stepId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "expiresAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "reason",
            "action"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "advance_agent_run",
      "title": "Advance an agent run phase",
      "description": "Advance exactly one phase along observe → plan → approve → execute → verify after all pending steps are settled. Entering execute requires a matching approved external-action approvalId and actionDigest from get_agent_run after a permitted human resolved the request in Operator, a current execute mandate, and no pending approvals or open exceptions. This changes control state only; it does not execute the approved action or contact a provider.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedPhase": {
            "type": "string",
            "enum": [
              "observe",
              "plan",
              "approve",
              "execute",
              "verify"
            ]
          },
          "nextPhase": {
            "type": "string",
            "enum": [
              "observe",
              "plan",
              "approve",
              "execute",
              "verify"
            ]
          },
          "approvalId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "runId",
          "expectedPhase",
          "nextPhase"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/advance",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedPhase": {
              "type": "string",
              "enum": [
                "observe",
                "plan",
                "approve",
                "execute",
                "verify"
              ]
            },
            "nextPhase": {
              "type": "string",
              "enum": [
                "observe",
                "plan",
                "approve",
                "execute",
                "verify"
              ]
            },
            "approvalId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "expectedActionDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedPhase",
            "nextPhase"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "raise_agent_exception",
      "title": "Raise and block on an agent exception",
      "description": "Record a structured operational, policy or evidence exception on an active run and block the run. Use a stable machine category plus a human-readable message and detail. Raising an exception does not roll back or infer the outcome of any provider action. Ambiguous provider side effects require a permitted human to reconcile them in Operator; poll the relevant read tool for the resulting state.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "detail": {
            "default": {},
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "runId",
          "category",
          "severity",
          "message"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "exception": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "exception"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/exceptions",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
            },
            "severity": {
              "type": "string",
              "enum": [
                "info",
                "warning",
                "critical"
              ]
            },
            "message": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            },
            "detail": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "stepId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "category",
            "severity",
            "message"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_agent_exceptions",
      "title": "List agent exceptions",
      "description": "List tenant-scoped agent exceptions newest first, optionally filtered by mission, run, status and severity. Use this before attempting resume: every open exception and pending approval must be resolved independently.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "missionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ]
          },
          "limit": {
            "description": "page size; API default 50",
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "offset": {
            "description": "rows to skip; API default 0",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "exceptions": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "exceptions"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/agent/exceptions",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "missionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "status": {
              "type": "string",
              "enum": [
                "open",
                "resolved"
              ]
            },
            "severity": {
              "type": "string",
              "enum": [
                "info",
                "warning",
                "critical"
              ]
            },
            "limit": {
              "description": "page size; API default 50",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "offset": {
              "description": "rows to skip; API default 0",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "resolve_agent_exception",
      "title": "Resolve an agent exception",
      "description": "Record the human or operational resolution of one open exception exactly once. This does not resume the run automatically and does not assert any provider outcome. Inspect all remaining exceptions and approvals, then call resume_agent_run separately when the run is genuinely clear.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "exceptionId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "exceptionId",
          "resolution"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "exception": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "exception"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/exceptions/{exceptionId}/resolve",
        "pathFields": [
          "exceptionId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "exceptionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "exceptionId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "resolution": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            }
          },
          "additionalProperties": false,
          "required": [
            "resolution"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "resume_agent_run",
      "title": "Resume a cleared blocked agent run",
      "description": "Move a blocked run back to running only after every exception is resolved and every approval is resolved. This is a control-state transition in the current phase; it does not retry, repeat or assume the outcome of any external action.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "runId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/resume",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "record_agent_decision",
      "title": "Record an agent decision and supporting evidence",
      "description": "Append a structured decision, rationale and up to 20 inline evidence records to a non-terminal run. Evidence content is SHA-256 digested by the API. This is an audit/explanation record only: a decision does not grant approval, change a mandate or prove a provider action occurred.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
          },
          "outcome": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "rationale": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "evidence": {
            "default": [],
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "source": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "content": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "observedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "kind",
                "source",
                "content"
              ]
            }
          }
        },
        "required": [
          "runId",
          "kind",
          "outcome",
          "rationale"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "decision": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "decision"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/decisions",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
            },
            "outcome": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "rationale": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            },
            "stepId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "evidence": {
              "default": [],
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "content": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "observedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "kind",
                  "source",
                  "content"
                ]
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "outcome",
            "rationale"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "record_agent_evidence",
      "title": "Record evidence for an agent run",
      "description": "Append one observed evidence object to a non-terminal run, optionally linked to a step. The API canonicalizes and SHA-256 digests the content. State the real source and observation time; this record does not independently verify the source or replace provider reconciliation evidence.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "content": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "runId",
          "kind",
          "source",
          "content"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "evidence": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "evidence"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/evidence",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
            },
            "source": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "content": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "observedAt": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            },
            "stepId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "source",
            "content"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "finish_agent_run",
      "title": "Finish an agent run",
      "description": "Finish a non-terminal run as succeeded, failed or cancelled using optimistic expectedPhase and a durable summary. Success requires verify phase, a completed verify step with linked evidence, and no pending steps, approvals or exceptions. In verify, add_agent_step with kind verify, record_agent_evidence linked by stepId, then complete_agent_step before finishing. This terminal control record frees the mission for another run; it does not change campaigns or infer success from missing provider evidence.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "outcome": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "expectedPhase": {
            "type": "string",
            "enum": [
              "observe",
              "plan",
              "approve",
              "execute",
              "verify"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "runId",
          "outcome",
          "expectedPhase",
          "summary"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "run": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "run"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/agent/runs/{runId}/finish",
        "pathFields": [
          "runId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "additionalProperties": false,
          "required": [
            "runId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "outcome": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed",
                "cancelled"
              ]
            },
            "expectedPhase": {
              "type": "string",
              "enum": [
                "observe",
                "plan",
                "approve",
                "execute",
                "verify"
              ]
            },
            "summary": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            }
          },
          "additionalProperties": false,
          "required": [
            "outcome",
            "expectedPhase",
            "summary"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_workspace_overview",
      "title": "Get the brand workspace overview",
      "description": "Read the authenticated brand workspace across every channel and supplier: campaign states, delivery, spend, outcome summaries, freshness and modeled/observed provenance. Supplier names are drill-down dimensions; the brand remains the top-level workspace. Optionally scope the overview to one tenant-owned campaignId.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "from": {
            "description": "optional inclusive campaign overlap start, YYYY-MM-DD",
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "to": {
            "description": "optional inclusive campaign overlap end, YYYY-MM-DD",
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "campaignId": {
            "description": "optional tenant-scoped campaign id",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/workspace/overview",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "from": {
              "description": "optional inclusive campaign overlap start, YYYY-MM-DD",
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "to": {
              "description": "optional inclusive campaign overlap end, YYYY-MM-DD",
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "campaignId": {
              "description": "optional tenant-scoped campaign id",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "suggest_search_keywords",
      "title": "Suggest paid-search keywords",
      "description": "Request Google Ads and/or Microsoft Advertising keyword ideas for this brand, including provider search volume, competition and bid estimates where available. Results retain their supplier and modeled/observed labels and do not change a plan. An optional page URL must use HTTPS without embedded credentials.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "seedKeywords": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "pageUrl": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri"
          },
          "countries": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "maxResults": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "adapterKeys": {
            "minItems": 1,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "google-ads",
                "microsoft-ads"
              ]
            }
          }
        },
        "required": [
          "seedKeywords"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/workspace/keywords/suggest",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "seedKeywords": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "pageUrl": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "countries": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              }
            },
            "language": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "maxResults": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "adapterKeys": {
              "minItems": 1,
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "google-ads",
                  "microsoft-ads"
                ]
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "seedKeywords"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_plan_search_keywords",
      "title": "Get a plan’s paid-search keywords",
      "description": "Read the exact keyword and negative-keyword selection shared by every paid-search line in a draft brand plan. Returns the provider targeting preview plus the optimistic selectionVersion and buyerPreviewVersion required to apply reviewed ideas. The preview explicitly blocks live conversion bidding until an exact provider-owned goal/action is persisted and provider-verified; initial canaries are clicks-only.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "planId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/plans/{planId}/search-keywords",
        "pathFields": [
          "planId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "planId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "planId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "set_plan_search_keywords",
      "title": "Set a draft plan’s paid-search keywords",
      "description": "Apply one buyer-reviewed keyword and negative-keyword set to every Google/Microsoft search line in a draft brand plan. Requires the latest selectionVersion so a stale agent cannot overwrite a buyer’s newer selection, plus the exact buyerPreviewVersion after reviewing provider match types, networks, bidding, budgets and account revisions. This edits targeting but does not approve or launch spend, and still requires a human-approved agent action bound to the exact plan snapshot.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "minLength": 1
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "expectedSelectionVersion": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "acknowledgedBuyerPreviewVersion": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "keywords": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "negativeKeywords": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          }
        },
        "required": [
          "planId",
          "agentStepId",
          "expectedActionDigest",
          "expectedSelectionVersion",
          "acknowledgedBuyerPreviewVersion",
          "keywords"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/plans/{planId}/search-keywords",
        "pathFields": [
          "planId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "planId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "planId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "plan.search-keywords.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedSelectionVersion": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "acknowledgedBuyerPreviewVersion": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "keywords": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            },
            "negativeKeywords": {
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedSelectionVersion",
            "acknowledgedBuyerPreviewVersion",
            "keywords"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "forecast_search_performance",
      "title": "Forecast Google search performance",
      "description": "Read Google Ads v25 keyword performance estimates for an explicit budget, flight, native geo and language references, match types and bidding strategy. This stateless planning query creates no provider campaign and enables no spend. Live calls require verified supplier authority. Google does not accept campaign negatives, network controls or a selected custom conversion goal for this endpoint; acknowledge those limitations explicitly. Clicks, conversions and cost are returned only when the provider supplies them. Missing metrics stay absent or null; this result does not claim impressions, reach, frequency or CPM. Sandbox estimates are clearly labeled modeled. The API supplies its own request clock; callers cannot override asOf.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "adapterKey": {
            "type": "string",
            "const": "google-ads"
          },
          "budget": {
            "type": "object",
            "properties": {
              "amountMinor": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "currency": {
                "type": "string",
                "enum": [
                  "GBP",
                  "USD",
                  "EUR"
                ]
              }
            },
            "required": [
              "amountMinor",
              "currency"
            ],
            "additionalProperties": false
          },
          "startDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "endDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "keywords": {
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "matchType": {
                  "type": "string",
                  "enum": [
                    "exact",
                    "phrase",
                    "broad"
                  ]
                }
              },
              "required": [
                "text",
                "matchType"
              ],
              "additionalProperties": false
            }
          },
          "geoTargetConstants": {
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^geoTargetConstants\\/\\d+$"
            }
          },
          "languageConstants": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^languageConstants\\/\\d+$"
            }
          },
          "bidding": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "const": "manual-cpc"
                  },
                  "maxCpcBidMinor": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "strategy",
                  "maxCpcBidMinor"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "const": "maximize-clicks"
                  },
                  "maxCpcBidMinor": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "strategy"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "strategy": {
                    "type": "string",
                    "const": "maximize-conversions"
                  }
                },
                "required": [
                  "strategy"
                ],
                "additionalProperties": false
              }
            ]
          },
          "acknowledgedLimitations": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "adapterKey",
          "budget",
          "startDate",
          "endDate",
          "keywords",
          "geoTargetConstants",
          "languageConstants",
          "bidding",
          "acknowledgedLimitations"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/planning/provider-forecast",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "adapterKey": {
              "type": "string",
              "const": "google-ads"
            },
            "budget": {
              "type": "object",
              "properties": {
                "amountMinor": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "GBP",
                    "USD",
                    "EUR"
                  ]
                }
              },
              "required": [
                "amountMinor",
                "currency"
              ],
              "additionalProperties": false
            },
            "startDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "endDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "keywords": {
              "minItems": 1,
              "maxItems": 1000,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "matchType": {
                    "type": "string",
                    "enum": [
                      "exact",
                      "phrase",
                      "broad"
                    ]
                  }
                },
                "required": [
                  "text",
                  "matchType"
                ],
                "additionalProperties": false
              }
            },
            "geoTargetConstants": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^geoTargetConstants\\/\\d+$"
              }
            },
            "languageConstants": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^languageConstants\\/\\d+$"
              }
            },
            "bidding": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "strategy": {
                      "type": "string",
                      "const": "manual-cpc"
                    },
                    "maxCpcBidMinor": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "strategy",
                    "maxCpcBidMinor"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "strategy": {
                      "type": "string",
                      "const": "maximize-clicks"
                    },
                    "maxCpcBidMinor": {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "strategy"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "strategy": {
                      "type": "string",
                      "const": "maximize-conversions"
                    }
                  },
                  "required": [
                    "strategy"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "acknowledgedLimitations": {
              "type": "boolean",
              "const": true
            }
          },
          "additionalProperties": false,
          "required": [
            "adapterKey",
            "budget",
            "startDate",
            "endDate",
            "keywords",
            "geoTargetConstants",
            "languageConstants",
            "bidding",
            "acknowledgedLimitations"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_identity_cohorts",
      "title": "List consented identity cohort metadata",
      "description": "List tenant-owned EUID cohort metadata, consent assertions, mapping counts and retention dates. No email hashes or EUIDs are returned. New live imports have no observed provider mapping; sandbox maintenance is labeled modeled. Cohorts do not yet deliver DSP audiences. Import and erasure require a human in the Identity dashboard.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohorts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "adapterKey": {
                  "type": "string",
                  "const": "euid"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "sandbox",
                    "live"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "deleted",
                    "expired"
                  ]
                },
                "revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "evidenceSource": {
                  "type": "string",
                  "enum": [
                    "not-observed",
                    "provider-reported",
                    "modeled"
                  ]
                },
                "consent": {
                  "type": "object",
                  "properties": {
                    "lawfulBasis": {
                      "type": "string",
                      "const": "consent"
                    },
                    "purpose": {
                      "type": "string",
                      "const": "euid-advertising-and-measurement"
                    },
                    "sourceReference": {
                      "type": "string"
                    },
                    "noticeVersion": {
                      "type": "string"
                    },
                    "obtainedAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "includesEuidSharing": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "lawfulBasis",
                    "purpose",
                    "sourceReference",
                    "noticeVersion",
                    "obtainedAt",
                    "expiresAt",
                    "includesEuidSharing"
                  ],
                  "additionalProperties": false
                },
                "consentEvidence": {
                  "type": "string",
                  "const": "operator-asserted"
                },
                "retainUntil": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "importedCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "summary": {
                  "type": "object",
                  "properties": {
                    "pending": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "fresh": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "refreshDue": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "optOutCheckDue": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "optedOut": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "unmapped": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "expired": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "pending",
                    "fresh",
                    "refreshDue",
                    "optOutCheckDue",
                    "optedOut",
                    "unmapped",
                    "expired"
                  ],
                  "additionalProperties": false
                },
                "nextRefreshAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "nextOptOutCheckAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "updatedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "deletedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "audienceDelivery": {
                  "type": "string",
                  "const": "unavailable"
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "adapterKey",
                "mode",
                "status",
                "revision",
                "evidenceSource",
                "consent",
                "consentEvidence",
                "retainUntil",
                "importedCount",
                "summary",
                "nextRefreshAt",
                "nextOptOutCheckAt",
                "createdAt",
                "updatedAt",
                "deletedAt",
                "audienceDelivery",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "cohorts",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/identity/cohorts",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "cursor": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_identity_cohort",
      "title": "Read identity cohort status and provider attempts",
      "description": "Read one tenant-owned identity cohort, its current connection revision and recent provider-attempt metadata. Stored hashes, EUIDs and provider payloads are never exposed. Read this before preparing a mapping or opt-out action. Uncertain provider outcomes require a human operator to review and resolve them in the Identity dashboard; never infer a failed outcome.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohortId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "cohortId"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohort": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "adapterKey": {
                "type": "string",
                "const": "euid"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "deleted",
                  "expired"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "evidenceSource": {
                "type": "string",
                "enum": [
                  "not-observed",
                  "provider-reported",
                  "modeled"
                ]
              },
              "consent": {
                "type": "object",
                "properties": {
                  "lawfulBasis": {
                    "type": "string",
                    "const": "consent"
                  },
                  "purpose": {
                    "type": "string",
                    "const": "euid-advertising-and-measurement"
                  },
                  "sourceReference": {
                    "type": "string"
                  },
                  "noticeVersion": {
                    "type": "string"
                  },
                  "obtainedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "includesEuidSharing": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "lawfulBasis",
                  "purpose",
                  "sourceReference",
                  "noticeVersion",
                  "obtainedAt",
                  "expiresAt",
                  "includesEuidSharing"
                ],
                "additionalProperties": false
              },
              "consentEvidence": {
                "type": "string",
                "const": "operator-asserted"
              },
              "retainUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "importedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "summary": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fresh": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refreshDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optOutCheckDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optedOut": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unmapped": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "expired": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "pending",
                  "fresh",
                  "refreshDue",
                  "optOutCheckDue",
                  "optedOut",
                  "unmapped",
                  "expired"
                ],
                "additionalProperties": false
              },
              "nextRefreshAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextOptOutCheckAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "deletedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "audienceDelivery": {
                "type": "string",
                "const": "unavailable"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "adapterKey",
              "mode",
              "status",
              "revision",
              "evidenceSource",
              "consent",
              "consentEvidence",
              "retainUntil",
              "importedCount",
              "summary",
              "nextRefreshAt",
              "nextOptOutCheckAt",
              "createdAt",
              "updatedAt",
              "deletedAt",
              "audienceDelivery",
              "note"
            ],
            "additionalProperties": false
          },
          "connection": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "configurationRevision": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mode",
              "configurationRevision"
            ],
            "additionalProperties": false
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "map",
                    "optout"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "discarded",
                    "reconciliation-required"
                  ]
                },
                "cohortRevision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "cohortRevision",
                "startedAt",
                "settledAt",
                "errorCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "cohort",
          "connection",
          "attempts"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/identity/cohorts/{cohortId}",
        "pathFields": [
          "cohortId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "cohortId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "cohortId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "map_identity_cohort",
      "title": "Map or refresh consented EUID identities",
      "description": "Execute the governed data.identity.map action for an existing consented cohort. Live execution sends stored identifiers to EUID; it requires supplier privacy authority and the exact cohort and connection revisions from get_identity_cohort. Use null expectedConnectionRevision for sandbox cohorts. No identities are accepted as tool input or returned. A human must approve the exact metadata-bound action. Retain the same UUID and revision inputs after a timeout; recorded requests are never automatically reissued. If the attempt is uncertain, hand it to a human operator and poll status. Mapping maintenance does not deliver a DSP audience.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohortId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "expectedConnectionRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "cohortId",
          "expectedRevision",
          "expectedConnectionRevision",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohort": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "adapterKey": {
                "type": "string",
                "const": "euid"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "deleted",
                  "expired"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "evidenceSource": {
                "type": "string",
                "enum": [
                  "not-observed",
                  "provider-reported",
                  "modeled"
                ]
              },
              "consent": {
                "type": "object",
                "properties": {
                  "lawfulBasis": {
                    "type": "string",
                    "const": "consent"
                  },
                  "purpose": {
                    "type": "string",
                    "const": "euid-advertising-and-measurement"
                  },
                  "sourceReference": {
                    "type": "string"
                  },
                  "noticeVersion": {
                    "type": "string"
                  },
                  "obtainedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "includesEuidSharing": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "lawfulBasis",
                  "purpose",
                  "sourceReference",
                  "noticeVersion",
                  "obtainedAt",
                  "expiresAt",
                  "includesEuidSharing"
                ],
                "additionalProperties": false
              },
              "consentEvidence": {
                "type": "string",
                "const": "operator-asserted"
              },
              "retainUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "importedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "summary": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fresh": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refreshDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optOutCheckDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optedOut": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unmapped": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "expired": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "pending",
                  "fresh",
                  "refreshDue",
                  "optOutCheckDue",
                  "optedOut",
                  "unmapped",
                  "expired"
                ],
                "additionalProperties": false
              },
              "nextRefreshAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextOptOutCheckAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "deletedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "audienceDelivery": {
                "type": "string",
                "const": "unavailable"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "adapterKey",
              "mode",
              "status",
              "revision",
              "evidenceSource",
              "consent",
              "consentEvidence",
              "retainUntil",
              "importedCount",
              "summary",
              "nextRefreshAt",
              "nextOptOutCheckAt",
              "createdAt",
              "updatedAt",
              "deletedAt",
              "audienceDelivery",
              "note"
            ],
            "additionalProperties": false
          },
          "connection": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "configurationRevision": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mode",
              "configurationRevision"
            ],
            "additionalProperties": false
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "map",
                    "optout"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "discarded",
                    "reconciliation-required"
                  ]
                },
                "cohortRevision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "cohortRevision",
                "startedAt",
                "settledAt",
                "errorCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "cohort",
          "connection",
          "attempts"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/identity/cohorts/{cohortId}/map",
        "pathFields": [
          "cohortId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "cohortId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "cohortId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "data.identity.map",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "expectedConnectionRevision": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision",
            "expectedConnectionRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "check_identity_optouts",
      "title": "Check provider opt-outs for an identity cohort",
      "description": "Execute the governed data.identity.optout action for an existing consented cohort. Live execution sends stored identifiers to EUID; it requires supplier privacy authority and the exact cohort and connection revisions from get_identity_cohort. Use null expectedConnectionRevision for sandbox cohorts. No identities are accepted as tool input or returned. A human must approve the exact metadata-bound action. Retain the same UUID and revision inputs after a timeout; recorded requests are never automatically reissued. If the attempt is uncertain, hand it to a human operator and poll status. Mapping maintenance does not deliver a DSP audience.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohortId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expectedRevision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "expectedConnectionRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "cohortId",
          "expectedRevision",
          "expectedConnectionRevision",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cohort": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "adapterKey": {
                "type": "string",
                "const": "euid"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "deleted",
                  "expired"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "evidenceSource": {
                "type": "string",
                "enum": [
                  "not-observed",
                  "provider-reported",
                  "modeled"
                ]
              },
              "consent": {
                "type": "object",
                "properties": {
                  "lawfulBasis": {
                    "type": "string",
                    "const": "consent"
                  },
                  "purpose": {
                    "type": "string",
                    "const": "euid-advertising-and-measurement"
                  },
                  "sourceReference": {
                    "type": "string"
                  },
                  "noticeVersion": {
                    "type": "string"
                  },
                  "obtainedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "expiresAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "includesEuidSharing": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "lawfulBasis",
                  "purpose",
                  "sourceReference",
                  "noticeVersion",
                  "obtainedAt",
                  "expiresAt",
                  "includesEuidSharing"
                ],
                "additionalProperties": false
              },
              "consentEvidence": {
                "type": "string",
                "const": "operator-asserted"
              },
              "retainUntil": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "importedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "summary": {
                "type": "object",
                "properties": {
                  "pending": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "fresh": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refreshDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optOutCheckDue": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "optedOut": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unmapped": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "expired": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "pending",
                  "fresh",
                  "refreshDue",
                  "optOutCheckDue",
                  "optedOut",
                  "unmapped",
                  "expired"
                ],
                "additionalProperties": false
              },
              "nextRefreshAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextOptOutCheckAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "deletedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "audienceDelivery": {
                "type": "string",
                "const": "unavailable"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "adapterKey",
              "mode",
              "status",
              "revision",
              "evidenceSource",
              "consent",
              "consentEvidence",
              "retainUntil",
              "importedCount",
              "summary",
              "nextRefreshAt",
              "nextOptOutCheckAt",
              "createdAt",
              "updatedAt",
              "deletedAt",
              "audienceDelivery",
              "note"
            ],
            "additionalProperties": false
          },
          "connection": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "sandbox",
                  "live"
                ]
              },
              "configurationRevision": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mode",
              "configurationRevision"
            ],
            "additionalProperties": false
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "map",
                    "optout"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in-flight",
                    "succeeded",
                    "failed",
                    "discarded",
                    "reconciliation-required"
                  ]
                },
                "cohortRevision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "settledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "errorCode": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "operation",
                "status",
                "cohortRevision",
                "startedAt",
                "settledAt",
                "errorCode"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "cohort",
          "connection",
          "attempts"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/identity/cohorts/{cohortId}/optout",
        "pathFields": [
          "cohortId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "cohortId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "additionalProperties": false,
          "required": [
            "cohortId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "data.identity.optout",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedRevision": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "expectedConnectionRevision": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedRevision",
            "expectedConnectionRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "classify_postcodes",
      "title": "Classify full UK postcodes with CACI Acorn",
      "description": "Return CACI postcode-level categories, groups and types, or explicitly modeled sandbox samples. Live lookups transfer postcodes and consume licensed supplier records, so approve the governed data.postcodes.classify action with these exact requests and connection preconditions first. Read expectedExecutionMode and expectedConfigurationRevision from list_connections; use null revision only when configured is false. Supply an opaque uid per row and a fresh UUID per batch. On an uncertain response retain the exact UUID, records and preconditions: repeating a recorded live attempt returns its metadata without submitting it again. Never automatically create a new UUID to bypass that result. Postcodes and classifications are not persisted by the API; keep raw records out of approval notes and durable agent evidence. Area classifications are not individual attributes or persona-affinity scores.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "requests": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uid": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
                },
                "postcode": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "uid",
                "postcode"
              ],
              "additionalProperties": false
            }
          },
          "expectedExecutionMode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          },
          "expectedConfigurationRevision": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotencyKey": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "requests",
          "expectedExecutionMode",
          "expectedConfigurationRevision",
          "idempotencyKey",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/data/caci-acorn/classify",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "data.postcodes.classify",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest",
          "idempotency-key": "idempotencyKey"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "requests": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "uid": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
                  },
                  "postcode": {
                    "type": "string",
                    "maxLength": 12
                  }
                },
                "required": [
                  "uid",
                  "postcode"
                ],
                "additionalProperties": false
              }
            },
            "expectedExecutionMode": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ]
            },
            "expectedConfigurationRevision": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "requests",
            "expectedExecutionMode",
            "expectedConfigurationRevision"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_brand_analytics",
      "title": "Get connected Plausible brand analytics",
      "description": "Read advertiser-owned Plausible website traffic, an optional exact goal display-name filter and currency-preserved revenue for a date range. The Stats API proves its executed filter but does not enumerate configured goal identities, so zero is explicitly ambiguous. Prefer tenant-scoped campaignId, which resolves the campaign’s immutable analytics key; the stored destination URL is context, not a page/path filter, and raw campaign is advanced compatibility only. The response is correlated brand-site evidence, not a causal media claim.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "fromDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "toDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "goal": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "campaign": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "fromDate",
          "toDate"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/workspace/analytics",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "fromDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "toDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "goal": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "campaign": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "additionalProperties": false,
          "required": [
            "fromDate",
            "toDate"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_personas",
      "title": "List personas",
      "description": "List all audience personas in AdBuyMCP (id, name, NL description, semantic core, version). Use this first to find an existing persona before extracting a new one.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "personas": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "personas"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/personas",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "extract_persona",
      "title": "Extract persona from a brief",
      "description": "Turn a natural-language audience brief (e.g. \"London-based technology decision makers\") into a structured AdBuyMCP persona: geo, demographics, firmographics, intent topics, interests, exclusions, with per-element confidence. Returns the created persona including its id — use that id with compile_persona and generate_plan.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "nlBrief": {
            "type": "string",
            "minLength": 3,
            "description": "the audience brief in plain English"
          }
        },
        "required": [
          "nlBrief"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "persona": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "persona"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/personas/extract",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "nlBrief": {
              "type": "string",
              "minLength": 3,
              "description": "the audience brief in plain English"
            }
          },
          "additionalProperties": false,
          "required": [
            "nlBrief"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "compile_persona",
      "title": "Compile persona to channel targeting",
      "description": "Compile a persona into concrete targeting for all seven workbench channels (CTV, audio, TV, cinema, DOOH, paid search, and paid social). Returns per-channel targeting specs, a fidelity score/grade per channel (person → household → content → venue → geo-cohort), a lawful-basis manifest for every targeting element, warnings, and a plain-English narration of how the persona translates on each channel.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "personaId": {
            "type": "string",
            "description": "persona id, e.g. per-1a2b3c4d"
          }
        },
        "required": [
          "personaId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "compiled": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "compiled"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/personas/{personaId}/compile",
        "pathFields": [
          "personaId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "personaId": {
              "type": "string",
              "description": "persona id, e.g. per-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "personaId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "browse_inventory",
      "title": "Browse buyable inventory",
      "description": "Browse concrete inventory on ctv, audio, tv, cinema, dooh, search, social — with location, format, monthly audience, CPM (pence), owner, and tags. This is how you hand-pick specific placements (\"the Piccadilly Lights screen\", \"that tech podcast\") instead of letting the AI planner choose: browse here, note the item ids, then pass them to create_manual_plan as selections. Filter by city, free-text query, or a maximum CPM in pence.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ],
            "description": "channel whose inventory to browse"
          },
          "city": {
            "description": "filter to a city, e.g. \"London\"",
            "type": "string"
          },
          "query": {
            "description": "free-text search over names, owners, and tags",
            "type": "string"
          },
          "maxCpmMinor": {
            "description": "only items at or below this CPM in minor units (pence), e.g. 800 = £8.00",
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "channel"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/inventory",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "channel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ],
              "description": "channel whose inventory to browse"
            },
            "city": {
              "description": "filter to a city, e.g. \"London\"",
              "type": "string"
            },
            "query": {
              "description": "free-text search over names, owners, and tags",
              "type": "string"
            },
            "maxCpmMinor": {
              "description": "only items at or below this CPM in minor units (pence), e.g. 800 = £8.00",
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false,
          "required": [
            "channel"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "generate_plan",
      "title": "Generate a media plan",
      "description": "Generate one brand-level media plan on ctv, audio, tv, cinema, dooh, search, social for a persona: budget split with reasoning, adapter-grounded forecasts (reach/impressions/CPM), flighting, and modeled total reach/frequency. Optionally choose the exact native Search and Social buyers; each selected provider receives its own reviewable budget line. Budget is in pounds sterling. Returns the draft plan with its id and line items — review it, then approve_plan to create a campaign.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "personaId": {
            "type": "string",
            "description": "persona id to plan for"
          },
          "budgetPounds": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 19000000,
            "description": "total budget in GBP pounds, e.g. 15000"
          },
          "goal": {
            "type": "string",
            "enum": [
              "awareness",
              "consideration",
              "performance"
            ],
            "description": "campaign goal"
          },
          "startDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "flight start, YYYY-MM-DD"
          },
          "endDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "flight end, YYYY-MM-DD (must be after startDate)"
          },
          "channels": {
            "description": "optional narrower channel selection; defaults to this product’s permitted channels",
            "minItems": 1,
            "maxItems": 7,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            }
          },
          "commercialBrief": {
            "description": "optional commercial and measurement context; monetary fields are integer pence",
            "type": "object",
            "properties": {
              "productOrOffer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "landingPageUrl": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              },
              "primaryKpi": {
                "type": "string",
                "enum": [
                  "reach",
                  "brand-awareness",
                  "consideration",
                  "site-visits",
                  "leads",
                  "sales",
                  "app-installs",
                  "custom"
                ]
              },
              "conversionDefinition": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "outcomeSource": {
                "type": "string",
                "enum": [
                  "campaign-tracking",
                  "analytics",
                  "crm",
                  "commerce",
                  "offline",
                  "none"
                ]
              },
              "targetValueMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2000000000
              },
              "baselineWeeklyConversions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000000
              },
              "priorMonthlyMediaSpendMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2000000000
              },
              "existingMediaMix": {
                "maxItems": 11,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ctv",
                    "audio",
                    "tv",
                    "cinema",
                    "dooh",
                    "search",
                    "social",
                    "display",
                    "email",
                    "print",
                    "other"
                  ]
                }
              },
              "firstPartyDataAvailability": {
                "type": "string",
                "enum": [
                  "none",
                  "limited",
                  "ready"
                ]
              },
              "creativeReadiness": {
                "type": "string",
                "enum": [
                  "needs-production",
                  "in-progress",
                  "ready"
                ]
              },
              "measurementIntent": {
                "minItems": 1,
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "delivered",
                    "responded",
                    "caused",
                    "remembered"
                  ]
                }
              },
              "exclusions": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "mandatories": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              }
            },
            "required": [
              "productOrOffer",
              "primaryKpi",
              "outcomeSource",
              "existingMediaMix",
              "firstPartyDataAvailability",
              "creativeReadiness",
              "measurementIntent",
              "exclusions",
              "mandatories"
            ],
            "additionalProperties": false
          },
          "paidMediaAdapterKeys": {
            "description": "exact unique paid-media buyers for this brand plan; Google/Microsoft are Search and Meta/TikTok are Social",
            "minItems": 1,
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "google-ads",
                "microsoft-ads",
                "meta-ads",
                "tiktok-ads"
              ]
            }
          }
        },
        "required": [
          "personaId",
          "budgetPounds",
          "goal",
          "startDate",
          "endDate"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "plan": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "plan"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/plans/generate",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "personaId": {
              "type": "string",
              "description": "persona id to plan for"
            },
            "goal": {
              "type": "string",
              "enum": [
                "awareness",
                "consideration",
                "performance"
              ],
              "description": "campaign goal"
            },
            "startDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "flight start, YYYY-MM-DD"
            },
            "endDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "flight end, YYYY-MM-DD (must be after startDate)"
            },
            "channels": {
              "description": "optional narrower channel selection; defaults to this product’s permitted channels",
              "minItems": 1,
              "maxItems": 7,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ctv",
                  "audio",
                  "tv",
                  "cinema",
                  "dooh",
                  "search",
                  "social"
                ]
              }
            },
            "commercialBrief": {
              "description": "optional commercial and measurement context; monetary fields are integer pence",
              "type": "object",
              "properties": {
                "productOrOffer": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "landingPageUrl": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                },
                "primaryKpi": {
                  "type": "string",
                  "enum": [
                    "reach",
                    "brand-awareness",
                    "consideration",
                    "site-visits",
                    "leads",
                    "sales",
                    "app-installs",
                    "custom"
                  ]
                },
                "conversionDefinition": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "outcomeSource": {
                  "type": "string",
                  "enum": [
                    "campaign-tracking",
                    "analytics",
                    "crm",
                    "commerce",
                    "offline",
                    "none"
                  ]
                },
                "targetValueMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2000000000
                },
                "baselineWeeklyConversions": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000000
                },
                "priorMonthlyMediaSpendMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2000000000
                },
                "existingMediaMix": {
                  "maxItems": 11,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "ctv",
                      "audio",
                      "tv",
                      "cinema",
                      "dooh",
                      "search",
                      "social",
                      "display",
                      "email",
                      "print",
                      "other"
                    ]
                  }
                },
                "firstPartyDataAvailability": {
                  "type": "string",
                  "enum": [
                    "none",
                    "limited",
                    "ready"
                  ]
                },
                "creativeReadiness": {
                  "type": "string",
                  "enum": [
                    "needs-production",
                    "in-progress",
                    "ready"
                  ]
                },
                "measurementIntent": {
                  "minItems": 1,
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "delivered",
                      "responded",
                      "caused",
                      "remembered"
                    ]
                  }
                },
                "exclusions": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "mandatories": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                }
              },
              "required": [
                "productOrOffer",
                "primaryKpi",
                "outcomeSource",
                "existingMediaMix",
                "firstPartyDataAvailability",
                "creativeReadiness",
                "measurementIntent",
                "exclusions",
                "mandatories"
              ],
              "additionalProperties": false
            },
            "paidMediaAdapterKeys": {
              "description": "exact unique paid-media buyers for this brand plan; Google/Microsoft are Search and Meta/TikTok are Social",
              "minItems": 1,
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "google-ads",
                  "microsoft-ads",
                  "meta-ads",
                  "tiktok-ads"
                ]
              }
            },
            "budgetMinor": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1900000000
            },
            "currency": {
              "const": "GBP",
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "personaId",
            "goal",
            "startDate",
            "endDate",
            "budgetMinor",
            "currency"
          ]
        },
        "bodyMapping": {
          "passthroughOtherFields": true,
          "budgetMinor": {
            "from": "budgetPounds",
            "transform": "Math.round(value * 100)"
          },
          "constants": {
            "currency": "GBP"
          },
          "channels": "Supplied channels; if omitted on a scoped surface, its permitted channels. Otherwise omitted."
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "create_manual_plan",
      "title": "Create a manual plan from hand-picked inventory",
      "description": "Build a media plan from inventory items YOU picked (via browse_inventory) instead of the AI planner. Trade-off: generate_plan optimizes the budget split across channels with reasoning and forecasts; create_manual_plan gives you exact control over which billboards/shows/channels/venues run, at the cost of that optimization. Budget is split across your selections and the platform fee is disclosed per line, exactly like an AI plan. The result is a normal draft plan: approve_plan and launch_campaign work the same afterwards. Optionally attach a persona for targeting/fidelity context.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "budgetPounds": {
            "type": "number",
            "minimum": 0.01,
            "maximum": 19000000,
            "description": "total budget in GBP pounds, e.g. 15000"
          },
          "goal": {
            "type": "string",
            "enum": [
              "awareness",
              "consideration",
              "performance"
            ],
            "description": "campaign goal"
          },
          "startDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "flight start, YYYY-MM-DD"
          },
          "endDate": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "flight end, YYYY-MM-DD (must be after startDate)"
          },
          "selections": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "channel": {
                  "type": "string",
                  "enum": [
                    "ctv",
                    "audio",
                    "tv",
                    "cinema",
                    "dooh",
                    "search",
                    "social"
                  ],
                  "description": "channel these items belong to"
                },
                "adapterKey": {
                  "type": "string",
                  "description": "adapter that owns the items, e.g. \"vistar\""
                },
                "itemIds": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "inventory item ids from browse_inventory"
                }
              },
              "required": [
                "channel",
                "adapterKey",
                "itemIds"
              ]
            },
            "description": "hand-picked inventory grouped by channel + adapter"
          },
          "personaId": {
            "description": "optional persona for targeting/fidelity context",
            "type": "string"
          },
          "commercialBrief": {
            "description": "optional commercial and measurement context; monetary fields are integer pence",
            "type": "object",
            "properties": {
              "productOrOffer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "landingPageUrl": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              },
              "primaryKpi": {
                "type": "string",
                "enum": [
                  "reach",
                  "brand-awareness",
                  "consideration",
                  "site-visits",
                  "leads",
                  "sales",
                  "app-installs",
                  "custom"
                ]
              },
              "conversionDefinition": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "outcomeSource": {
                "type": "string",
                "enum": [
                  "campaign-tracking",
                  "analytics",
                  "crm",
                  "commerce",
                  "offline",
                  "none"
                ]
              },
              "targetValueMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2000000000
              },
              "baselineWeeklyConversions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 10000000
              },
              "priorMonthlyMediaSpendMinor": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2000000000
              },
              "existingMediaMix": {
                "maxItems": 11,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ctv",
                    "audio",
                    "tv",
                    "cinema",
                    "dooh",
                    "search",
                    "social",
                    "display",
                    "email",
                    "print",
                    "other"
                  ]
                }
              },
              "firstPartyDataAvailability": {
                "type": "string",
                "enum": [
                  "none",
                  "limited",
                  "ready"
                ]
              },
              "creativeReadiness": {
                "type": "string",
                "enum": [
                  "needs-production",
                  "in-progress",
                  "ready"
                ]
              },
              "measurementIntent": {
                "minItems": 1,
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "delivered",
                    "responded",
                    "caused",
                    "remembered"
                  ]
                }
              },
              "exclusions": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              },
              "mandatories": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                }
              }
            },
            "required": [
              "productOrOffer",
              "primaryKpi",
              "outcomeSource",
              "existingMediaMix",
              "firstPartyDataAvailability",
              "creativeReadiness",
              "measurementIntent",
              "exclusions",
              "mandatories"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "budgetPounds",
          "goal",
          "startDate",
          "endDate",
          "selections"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "plan": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "plan"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/plans/manual",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "goal": {
              "type": "string",
              "enum": [
                "awareness",
                "consideration",
                "performance"
              ],
              "description": "campaign goal"
            },
            "startDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "flight start, YYYY-MM-DD"
            },
            "endDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "flight end, YYYY-MM-DD (must be after startDate)"
            },
            "selections": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "ctv",
                      "audio",
                      "tv",
                      "cinema",
                      "dooh",
                      "search",
                      "social"
                    ],
                    "description": "channel these items belong to"
                  },
                  "adapterKey": {
                    "type": "string",
                    "description": "adapter that owns the items, e.g. \"vistar\""
                  },
                  "itemIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "inventory item ids from browse_inventory"
                  }
                },
                "required": [
                  "channel",
                  "adapterKey",
                  "itemIds"
                ]
              },
              "description": "hand-picked inventory grouped by channel + adapter"
            },
            "personaId": {
              "description": "optional persona for targeting/fidelity context",
              "type": "string"
            },
            "commercialBrief": {
              "description": "optional commercial and measurement context; monetary fields are integer pence",
              "type": "object",
              "properties": {
                "productOrOffer": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "landingPageUrl": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                },
                "primaryKpi": {
                  "type": "string",
                  "enum": [
                    "reach",
                    "brand-awareness",
                    "consideration",
                    "site-visits",
                    "leads",
                    "sales",
                    "app-installs",
                    "custom"
                  ]
                },
                "conversionDefinition": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "outcomeSource": {
                  "type": "string",
                  "enum": [
                    "campaign-tracking",
                    "analytics",
                    "crm",
                    "commerce",
                    "offline",
                    "none"
                  ]
                },
                "targetValueMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2000000000
                },
                "baselineWeeklyConversions": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 10000000
                },
                "priorMonthlyMediaSpendMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2000000000
                },
                "existingMediaMix": {
                  "maxItems": 11,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "ctv",
                      "audio",
                      "tv",
                      "cinema",
                      "dooh",
                      "search",
                      "social",
                      "display",
                      "email",
                      "print",
                      "other"
                    ]
                  }
                },
                "firstPartyDataAvailability": {
                  "type": "string",
                  "enum": [
                    "none",
                    "limited",
                    "ready"
                  ]
                },
                "creativeReadiness": {
                  "type": "string",
                  "enum": [
                    "needs-production",
                    "in-progress",
                    "ready"
                  ]
                },
                "measurementIntent": {
                  "minItems": 1,
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "delivered",
                      "responded",
                      "caused",
                      "remembered"
                    ]
                  }
                },
                "exclusions": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                },
                "mandatories": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  }
                }
              },
              "required": [
                "productOrOffer",
                "primaryKpi",
                "outcomeSource",
                "existingMediaMix",
                "firstPartyDataAvailability",
                "creativeReadiness",
                "measurementIntent",
                "exclusions",
                "mandatories"
              ],
              "additionalProperties": false
            },
            "budgetMinor": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1900000000
            },
            "currency": {
              "const": "GBP",
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "goal",
            "startDate",
            "endDate",
            "selections",
            "budgetMinor",
            "currency"
          ]
        },
        "bodyMapping": {
          "passthroughOtherFields": true,
          "budgetMinor": {
            "from": "budgetPounds",
            "transform": "Math.round(value * 100)"
          },
          "constants": {
            "currency": "GBP"
          }
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_plans",
      "title": "List media plans",
      "description": "List this advertiser’s media plans, newest first. Use this when the user asks for an existing draft or approved plan but has not supplied its id; then call get_plan before editing or approving it.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "plans": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "plans"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/plans",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_plan",
      "title": "Get a media plan",
      "description": "Fetch a media plan by id: status (draft/approved), line items with budgets and forecasts, total forecast, narrative, and a staleReason if the persona changed since the plan was generated.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "description": "plan id"
          }
        },
        "required": [
          "planId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "plan": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "plan"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/plans/{planId}",
        "pathFields": [
          "planId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "planId": {
              "type": "string",
              "description": "plan id"
            }
          },
          "additionalProperties": false,
          "required": [
            "planId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "update_plan_allocations",
      "title": "Update and reforecast draft plan allocations",
      "description": "Change one or more line budgets on a DRAFT plan and reforecast every changed line through its selected adapter. Use the allocationVersion returned by get_plan as expectedAllocationVersion; a concurrent change returns PLAN_VERSION_CONFLICT, in which case reload and ask the user to review the new state. Omitted lines keep their budgets. Amounts are pounds sterling and each line must remain above its channel/flight minimum. This changes money allocation and must be shown to the user before calling it.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "minLength": 1,
            "description": "draft plan id"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "expectedAllocationVersion": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "allocationVersion from the latest get_plan response"
          },
          "lines": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lineItemId": {
                  "type": "string",
                  "minLength": 1,
                  "description": "line id from get_plan"
                },
                "budgetPounds": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 19000000,
                  "description": "replacement line budget in GBP pounds"
                }
              },
              "required": [
                "lineItemId",
                "budgetPounds"
              ]
            }
          }
        },
        "required": [
          "planId",
          "agentStepId",
          "expectedActionDigest",
          "expectedAllocationVersion",
          "lines"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "plan": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "plan"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/plans/{planId}",
        "pathFields": [
          "planId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "planId": {
              "type": "string",
              "minLength": 1,
              "description": "draft plan id"
            }
          },
          "additionalProperties": false,
          "required": [
            "planId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "plan.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "expectedAllocationVersion": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$",
              "description": "allocationVersion from the latest get_plan response"
            },
            "lines": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "id",
                  "budgetMinor"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "budgetMinor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1900000000
                  }
                }
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "expectedAllocationVersion",
            "lines"
          ]
        },
        "bodyMapping": {
          "expectedAllocationVersion": "expectedAllocationVersion",
          "lines[].id": "lines[].lineItemId",
          "lines[].budgetMinor": {
            "from": "lines[].budgetPounds",
            "transform": "Math.round(value * 100)"
          }
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "approve_plan",
      "title": "Approve a plan (creates campaign)",
      "description": "Approve a draft media plan. This locks the plan and creates a campaign with one channel-campaign per plan line, all in status \"pending\". Returns the new campaign including its id — use launch_campaign to activate it. Fails with 409 if the plan is already approved.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "planId": {
            "type": "string",
            "description": "draft plan id to approve"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "planId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "campaign"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/plans/{planId}/approve",
        "pathFields": [
          "planId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "planId": {
              "type": "string",
              "description": "draft plan id to approve"
            }
          },
          "additionalProperties": false,
          "required": [
            "planId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "plan.approve",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_bookings",
      "title": "Review supplier booking requests and the exact commitment",
      "description": "Read the campaign’s durable supplier booking requests and current preview: exact snapshot digest, media budget, maximum commitment, currency, eligible lines, readiness and blockers. Use this before requesting buyer approval and poll it after booking. A 12-hour confirmation deadline is the supplier response window; overdue never means accepted or safely cancelled.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "bookings": {
            "type": "array",
            "items": {}
          },
          "preview": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "bookings",
          "preview"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/bookings",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "request_campaign_booking",
      "title": "Request the buyer-approved supplier booking",
      "description": "Request supplier booking for exactly the preview the buyer approved. Show the media split, maximum commitment, creative and flight before asking for approval. Use the campaign.booking.request governed action and exact execute-step authority. This records a durable booking request with a 12-hour supplier confirmation window; it does not fabricate supplier acceptance. Reuse the idempotency key after a timeout and poll get_campaign_bookings. Confirmation is a human-only Operator action, and an expired response window never authorizes automatic retry or acceptance.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          },
          "expectedSnapshotDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "approvalConfirmed": {
            "type": "boolean",
            "const": true,
            "description": "true only after the buyer explicitly approved this exact preview"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "campaignId",
          "idempotencyKey",
          "expectedSnapshotDigest",
          "approvalConfirmed",
          "agentStepId",
          "expectedActionDigest"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "booking": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "booking"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/bookings",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.booking.request",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "idempotencyKey": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            },
            "expectedSnapshotDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "approvalConfirmed": {
              "type": "boolean",
              "const": true,
              "description": "true only after the buyer explicitly approved this exact preview"
            }
          },
          "additionalProperties": false,
          "required": [
            "idempotencyKey",
            "expectedSnapshotDigest",
            "approvalConfirmed"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_campaign_conversion_goals",
      "title": "Review provider conversion goals for a campaign line",
      "description": "Read exact Google, Microsoft, TikTok or Meta website conversion goals for one approved campaign line. Returns provider account, complete immutable rule definitions and digests, connection revision, availability blockers and the selected binding. Event activity is separate from goal configuration. Live reads require verified supplier authority; sandbox examples are explicitly labeled. Use the returned goal reference and revision evidence in set_campaign_conversion_goal.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1
          },
          "lineId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "campaignId",
          "lineId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/lines/{lineId}/conversion-goals",
        "pathFields": [
          "campaignId",
          "lineId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1
            },
            "lineId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId",
            "lineId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "set_campaign_conversion_goal",
      "title": "Bind an approved provider conversion goal",
      "description": "Bind one freshly read provider-owned conversion rule to a pending campaign line and its approved performance brief and destination. Requires the exact definition digest, connection revision and current binding ID from list_campaign_conversion_goals, plus governed action approval. The provider definition is reread before saving. Activated lines are immutable; stale evidence returns a conflict and must be reviewed again. TikTok and Meta require explicit click/view attribution windows and event counting; these have no defaults and become immutable after creation. This selection does not launch or enable spend.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1
          },
          "lineId": {
            "type": "string",
            "minLength": 1
          },
          "goalRef": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "expectedDefinitionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "expectedConnectionRevision": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "expectedBindingId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          },
          "tiktokSettings": {
            "type": "object",
            "properties": {
              "clickAttributionWindow": {
                "type": "string",
                "enum": [
                  "ONE_DAY",
                  "SEVEN_DAYS",
                  "FOURTEEN_DAYS",
                  "TWENTY_EIGHT_DAYS"
                ]
              },
              "viewAttributionWindow": {
                "type": "string",
                "enum": [
                  "OFF",
                  "ONE_DAY",
                  "SEVEN_DAYS"
                ]
              },
              "attributionEventCount": {
                "type": "string",
                "enum": [
                  "ONCE",
                  "EVERY"
                ]
              }
            },
            "required": [
              "clickAttributionWindow",
              "viewAttributionWindow",
              "attributionEventCount"
            ],
            "additionalProperties": false
          },
          "metaSettings": {
            "type": "object",
            "properties": {
              "clickAttributionWindow": {
                "type": "string",
                "enum": [
                  "ONE_DAY",
                  "SEVEN_DAYS"
                ]
              },
              "viewAttributionWindow": {
                "type": "string",
                "enum": [
                  "OFF",
                  "ONE_DAY"
                ]
              },
              "attributionCountType": {
                "type": "string",
                "enum": [
                  "ALL_CONVERSIONS",
                  "FIRST_CONVERSION"
                ]
              }
            },
            "required": [
              "clickAttributionWindow",
              "viewAttributionWindow",
              "attributionCountType"
            ],
            "additionalProperties": false
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "campaignId",
          "lineId",
          "goalRef",
          "expectedDefinitionDigest",
          "expectedConnectionRevision",
          "expectedBindingId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/campaigns/{campaignId}/lines/{lineId}/conversion-goal",
        "pathFields": [
          "campaignId",
          "lineId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1
            },
            "lineId": {
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId",
            "lineId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.conversion-goal.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "goalRef": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "expectedDefinitionDigest": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "expectedConnectionRevision": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "expectedBindingId": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "tiktokSettings": {
              "type": "object",
              "properties": {
                "clickAttributionWindow": {
                  "type": "string",
                  "enum": [
                    "ONE_DAY",
                    "SEVEN_DAYS",
                    "FOURTEEN_DAYS",
                    "TWENTY_EIGHT_DAYS"
                  ]
                },
                "viewAttributionWindow": {
                  "type": "string",
                  "enum": [
                    "OFF",
                    "ONE_DAY",
                    "SEVEN_DAYS"
                  ]
                },
                "attributionEventCount": {
                  "type": "string",
                  "enum": [
                    "ONCE",
                    "EVERY"
                  ]
                }
              },
              "required": [
                "clickAttributionWindow",
                "viewAttributionWindow",
                "attributionEventCount"
              ],
              "additionalProperties": false
            },
            "metaSettings": {
              "type": "object",
              "properties": {
                "clickAttributionWindow": {
                  "type": "string",
                  "enum": [
                    "ONE_DAY",
                    "SEVEN_DAYS"
                  ]
                },
                "viewAttributionWindow": {
                  "type": "string",
                  "enum": [
                    "OFF",
                    "ONE_DAY"
                  ]
                },
                "attributionCountType": {
                  "type": "string",
                  "enum": [
                    "ALL_CONVERSIONS",
                    "FIRST_CONVERSION"
                  ]
                }
              },
              "required": [
                "clickAttributionWindow",
                "viewAttributionWindow",
                "attributionCountType"
              ],
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "required": [
            "goalRef",
            "expectedDefinitionDigest",
            "expectedConnectionRevision",
            "expectedBindingId"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "launch_campaign",
      "title": "Launch a campaign",
      "description": "Activate every pending/errored channel-campaign via its adapter (API channels go live or pending-approval; workflow channels like cinema/AdSmart start a booking workflow). Sandbox workflow lines can also resume here. Live paid-media activation stages provider objects paused; a human must record exact provider creative approval and issue fresh supplier authority before resume can enable the manifest-bound hierarchy. Before first launch, every campaign line must have at least one selected creative for the same channel with a completed, non-failing policy precheck; generate_creative with campaignId attaches new work automatically, or use set_campaign_creatives to select reusable existing work. Returns the refreshed campaign plus per-line launchErrors if any adapter failed.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id, e.g. cmp-1a2b3c4d"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/launch",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id, e.g. cmp-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.launch",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "pause_campaign",
      "title": "Pause a campaign",
      "description": "Pause every active channel-campaign through its executing adapter. Each live provider call is durable, and AdBuyMCP keeps pausing the remaining lines if one fails. A complete pause returns the campaign in paused-pending-reconciliation. A 502 may be state-bearing: PAUSE_FAILED means confirmed-paused lines stay paused while active lines can be retried; PAUSE_RECONCILIATION_REQUIRED means an unknown vendor outcome must be inspected with list_campaign_attempts and handed to a permitted human in Operator. Poll get_campaign after that reconciliation. Unused wallet funds stay reserved until final reporting through the pause boundary reconciles.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id to pause"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/pause",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id to pause"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.pause",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "resume_campaign",
      "title": "Resume a paused campaign",
      "description": "After pause reporting has reconciled, resume a paused campaign without creating a duplicate external campaign. A live paid-media resume requires exact creative approvals, a persisted staged-resource manifest, and fresh human-issued supplier authority; the adapter proves the upstream hierarchy still matches before enabling it. Returns the refreshed campaign.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "paused campaign id to resume"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/resume",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "paused campaign id to resume"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.resume",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_campaigns",
      "title": "List campaigns",
      "description": "List all campaigns with their status (including pending, live, pausing, pause-failed, paused-pending-reconciliation, paused, reconciliation-required, and error), flight dates, and per-channel status, adapter, budget, and external references. Inspect the per-channel statuses for partial pauses: pause-failed can contain both paused and still-active lines.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "campaigns"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign",
      "title": "Get campaign operating state",
      "description": "Fetch one tenant-scoped campaign with its plan, selected creatives, channel-campaign lines, booking workflows and current statuses. Use this before any campaign mutation when the user has supplied a campaign id, and after launch/pause/resume to inspect partial line-level state.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "campaign"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_readiness",
      "title": "Check campaign launch readiness",
      "description": "Read the exact fail-closed launch or resume checklist without reserving money, submitting creative, advancing workflows or calling a media provider. Returns readyToLaunch plus funding, measurement, creative, execution and workflow findings. ALWAYS call this immediately before asking for approval to launch; surface every blocker, action and warning rather than merely reporting the boolean. Launch repeats the checks atomically.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id to assess"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "readiness": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "readiness"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/readiness",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id to assess"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_live_execution_grants",
      "title": "List campaign live-execution grants",
      "description": "Inspect the tenant-scoped, campaign-specific supplier authority records that back controlled live execution. Returns each exact adapter grant with its dossier and connection revisions, minor-unit budget cap, currency, validity window and issued, claimed or revoked state; compare the validity window with the current time to identify expiry. This is strictly read-only: grant issue and revocation are human-only in Operator, while claim is not a separate handoff — AdBuyMCP consumes the exact grant atomically inside an approved launch before provider I/O.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id whose live-execution grants should be inspected"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "adapterKey": {
                  "type": "string"
                },
                "campaignId": {
                  "type": "string"
                },
                "supplierDossierId": {
                  "type": "string"
                },
                "dossierRevision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "connectionConfigurationRevision": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "maxBudgetMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "currency": {
                  "type": "string",
                  "enum": [
                    "GBP",
                    "USD",
                    "EUR"
                  ]
                },
                "reason": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "issued",
                    "claimed",
                    "revoked"
                  ]
                },
                "issuedBy": {
                  "type": "string"
                },
                "issuedActor": {
                  "type": "string",
                  "const": "human"
                },
                "issuedSource": {
                  "type": "string",
                  "enum": [
                    "dev",
                    "web"
                  ]
                },
                "issuedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "validFrom": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "claimedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "claimedBudgetMinor": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "claimedBy": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "claimedActor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "human",
                        "agent",
                        "system"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "claimedSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "dev",
                        "web",
                        "mcp",
                        "system"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revokedBy": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revokedActor": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "human",
                        "agent",
                        "system"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revokedSource": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "dev",
                        "web",
                        "mcp",
                        "system"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revokedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revocationNote": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "adapterKey",
                "campaignId",
                "supplierDossierId",
                "dossierRevision",
                "connectionConfigurationRevision",
                "maxBudgetMinor",
                "currency",
                "reason",
                "status",
                "issuedBy",
                "issuedActor",
                "issuedSource",
                "issuedAt",
                "validFrom",
                "expiresAt",
                "claimedAt",
                "claimedBudgetMinor",
                "claimedBy",
                "claimedActor",
                "claimedSource",
                "revokedBy",
                "revokedActor",
                "revokedSource",
                "revokedAt",
                "revocationNote"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "grants"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/live-test-grants",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id whose live-execution grants should be inspected"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_campaign_attempts",
      "title": "List campaign provider attempts",
      "description": "List the durable provider calls for one campaign, including operation, adapter, execution mode, status, idempotency key, vendor reference, and diagnostic detail. Use this when a campaign is reconciliation-required to identify the exact call a permitted human must verify and resolve in Operator. MCP identities can inspect and poll this state but cannot assert the outcome.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id awaiting reconciliation"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "attempts": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "attempts"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/attempts",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id awaiting reconciliation"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_dead_letters",
      "title": "Get parked campaign delivery reports",
      "description": "List delivery-report pulls for one campaign that reached the retry ceiling and are now parked, including the affected line, adapter, attempt count, last error and observation times. This is read-only: it does not requeue a report, change delivery or release held funds. Hand the exact record and corrective evidence to a permitted human in Operator, then poll this tool until the record clears and verify fresh authoritative delivery. MCP identities cannot perform the requeue.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id with parked reporting"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "deadLetters": {
            "type": "array",
            "items": {}
          },
          "policy": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "deadLetters",
          "policy"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/dead-letters",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id with parked reporting"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_delivery",
      "title": "Get campaign delivery",
      "description": "Normalized delivery for a campaign: totals (impressions, spend), per-channel and per-day breakdowns, modeled deduped reach (labeled as modeled; daily reach rows are never summed), and byPlacement — the per-unit view: which individual board, show, screen or app ran, on how many days, and what it cost. byPlacement.coveragePct states what share of spend could be attributed to a named unit; the remainder is reported at line level because not every rail breaks delivery down that far, which is legitimate and NOT an unidentified board. Raw per-day×geo×placement rows are omitted for compactness — rowCount tells you how many exist; fetch the CSV export for the full ledger.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/delivery",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "MCP replaces raw rows with rowCount and preserves the other REST aggregates."
      }
    },
    {
      "name": "get_measurement",
      "title": "Get campaign measurement (four verbs)",
      "description": "The four-verb measurement story for a campaign: Delivered (normalized delivery + channel-native metrics side-by-side), Responded (pixel/promo tracking, outcomes, attribution), Caused (latest geo-lift result, or a pointer to prove_it), Remembered (bounded study records, mode and retained-result metadata; no pooled survey statistics). Use this to report campaign performance honestly.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/measurement",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_tracking",
      "title": "Get campaign response tracking",
      "description": "Read each campaign channel’s provisioned promo code, pixel URL/tag and vanity URL, plus whether the vanity destination has been configured. Use this before launch when responded measurement is expected. Public pixels record pageviews only; use import_outcomes for authenticated conversion/value data, and do not claim response coverage merely because identifiers exist.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tracking": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "tracking"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/tracking",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "set_campaign_tracking",
      "title": "Set a campaign vanity destination",
      "description": "Set or clear the HTTPS destination behind one campaign channel’s AdBuyMCP vanity URL. The URL must be HTTPS and contain no embedded credentials. This changes where future respondents are redirected, is audit logged, and should be previewed with the user before calling. Pass null only when the user explicitly wants to disable that channel’s vanity redirect.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "channel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ],
            "description": "campaign channel whose vanity destination changes"
          },
          "destinationUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "new HTTPS destination, or null to disable the redirect"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest",
          "channel",
          "destinationUrl"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tracking": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "tracking"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/campaigns/{campaignId}/tracking/{channel}",
        "pathFields": [
          "campaignId",
          "channel"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id"
            },
            "channel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ],
              "description": "campaign channel whose vanity destination changes"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId",
            "channel"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.tracking.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "destinationUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "new HTTPS destination, or null to disable the redirect"
            }
          },
          "additionalProperties": false,
          "required": [
            "destinationUrl"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "import_outcomes",
      "title": "Import campaign outcomes",
      "description": "Import up to 500 authenticated analytics, commerce, CRM or offline response events for one campaign. Each event needs an opaque source event id for deterministic deduplication. Raw identifiers are forbidden; optional household identity must already be a SHA-256 hash. A promo code is accepted only when provisioned for this campaign. Imported response remains correlational unless deterministic evidence or a powered causal test supports it.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "target campaign id"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "source": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 2,
                "maxLength": 64,
                "pattern": "^[a-z0-9][a-z0-9_-]*$",
                "description": "stable lowercase feed key, e.g. shopify"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "analytics",
                  "commerce",
                  "crm",
                  "offline",
                  "other"
                ]
              },
              "reference": {
                "description": "opaque dataset or export reference; never raw identity",
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9._:/-]+$"
              }
            },
            "required": [
              "key",
              "kind"
            ]
          },
          "privacy": {
            "type": "object",
            "properties": {
              "lawfulBasis": {
                "type": "string",
                "enum": [
                  "consent",
                  "legitimate-interest"
                ]
              },
              "consentConfirmed": {
                "type": "boolean",
                "description": "must be true when lawfulBasis is consent"
              },
              "identityMode": {
                "type": "string",
                "enum": [
                  "none",
                  "household-sha256"
                ]
              },
              "rawIdentifiersRemoved": {
                "type": "boolean",
                "const": true,
                "description": "required privacy attestation"
              }
            },
            "required": [
              "lawfulBasis",
              "consentConfirmed",
              "identityMode",
              "rawIdentifiersRemoved"
            ]
          },
          "events": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9._:-]+$",
                  "description": "opaque source id; do not send an email or raw identity"
                },
                "ts": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "pageview",
                    "conversion"
                  ]
                },
                "valueMinor": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 2147483647
                },
                "promoCode": {
                  "type": "string",
                  "maxLength": 64,
                  "pattern": "^CHORUS-[A-Z]{2,3}-[0-9A-F]{4}$"
                },
                "market": {
                  "description": "aggregate market key",
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9][a-z0-9_-]*$"
                },
                "householdKeyHash": {
                  "description": "SHA-256 only; never a raw household identifier",
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "required": [
                "eventId",
                "ts",
                "kind"
              ]
            }
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest",
          "source",
          "privacy",
          "events"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "import": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "import"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/outcomes/import",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "target campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "outcome.import",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "source": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 64,
                  "pattern": "^[a-z0-9][a-z0-9_-]*$",
                  "description": "stable lowercase feed key, e.g. shopify"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "analytics",
                    "commerce",
                    "crm",
                    "offline",
                    "other"
                  ]
                },
                "reference": {
                  "description": "opaque dataset or export reference; never raw identity",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9._:/-]+$"
                }
              },
              "required": [
                "key",
                "kind"
              ]
            },
            "privacy": {
              "type": "object",
              "properties": {
                "lawfulBasis": {
                  "type": "string",
                  "enum": [
                    "consent",
                    "legitimate-interest"
                  ]
                },
                "consentConfirmed": {
                  "type": "boolean",
                  "description": "must be true when lawfulBasis is consent"
                },
                "identityMode": {
                  "type": "string",
                  "enum": [
                    "none",
                    "household-sha256"
                  ]
                },
                "rawIdentifiersRemoved": {
                  "type": "boolean",
                  "const": true,
                  "description": "required privacy attestation"
                }
              },
              "required": [
                "lawfulBasis",
                "consentConfirmed",
                "identityMode",
                "rawIdentifiersRemoved"
              ]
            },
            "events": {
              "minItems": 1,
              "maxItems": 500,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "eventId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9._:-]+$",
                    "description": "opaque source id; do not send an email or raw identity"
                  },
                  "ts": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "pageview",
                      "conversion"
                    ]
                  },
                  "valueMinor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  "promoCode": {
                    "type": "string",
                    "maxLength": 64,
                    "pattern": "^CHORUS-[A-Z]{2,3}-[0-9A-F]{4}$"
                  },
                  "market": {
                    "description": "aggregate market key",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9][a-z0-9_-]*$"
                  },
                  "householdKeyHash": {
                    "description": "SHA-256 only; never a raw household identifier",
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                },
                "required": [
                  "eventId",
                  "ts",
                  "kind"
                ]
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "source",
            "privacy",
            "events"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_outcome_health",
      "title": "Get campaign outcome-feed health",
      "description": "Read observed outcome recency, source volumes and field coverage for one campaign. This is a feed diagnostic, not proof that every real-world conversion was captured and not causal attribution.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "health": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "health"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/outcomes/health",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_report",
      "title": "Get the shareable campaign report",
      "description": "Return the URL of a self-contained, printable campaign report — delivered spend by channel, modeled reach, responses, and the causal result (or an honest refusal where the test was not powered or had no clean control market). It is a single HTML file with no scripts and no external requests, rendered in the advertiser brand kit, meant to be opened, printed to PDF and forwarded to people who never log into AdBuyMCP. The document body is deliberately NOT inlined here: it is several kilobytes of markup that is useless to read as text. Use get_measurement instead when you need the numbers themselves. NOTE: the URL is tenant-scoped, not a public share link — under AUTH_MODE=clerk it needs the same credentials this MCP server uses, so a recipient without an account cannot open it. Download it and attach the file, or open it yourself and print to PDF.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id to report on"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/report",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id to report on"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST returns HTML; MCP returns an authenticated report URL and byte count, without the markup."
      }
    },
    {
      "name": "get_audit",
      "title": "Read the audit trail",
      "description": "Read the append-only audit trail of tenant-visible mutations: persona create/update/delete, plan approval, campaign launch/pause/resume and creative-selection changes, optimization approvals and rejections, connection updates, creative generation/revision/submission, outcome imports, audience syncs, wallet top-ups and asset charges — each with who did it, when, and the entity it touched. This is what a finance or governance reviewer asks for first. Newest first, paged.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "limit": {
            "description": "page size, default 50",
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "offset": {
            "description": "rows to skip, default 0",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "description": "filter to one action, e.g. \"campaign.launch\"",
            "type": "string"
          },
          "entity": {
            "description": "filter to one entity type, e.g. \"campaign\"",
            "type": "string"
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/audit",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "limit": {
              "description": "page size, default 50",
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "offset": {
              "description": "rows to skip, default 0",
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "action": {
              "description": "filter to one action, e.g. \"campaign.launch\"",
              "type": "string"
            },
            "entity": {
              "description": "filter to one entity type, e.g. \"campaign\"",
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "prove_it",
      "title": "Run geo-lift (\"Prove It\")",
      "description": "Run a matched-market geo-lift test on a campaign’s geo-tagged conversions: power analysis first (the engine REFUSES underpowered tests and says why), then diff-in-diff lift vs matched control markets. Returns status completed (with lift + confidence) or refused (with the power readout).",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id"
          },
          "testMarket": {
            "description": "test market key (default \"london\")",
            "type": "string"
          },
          "expectedLiftPct": {
            "description": "expected lift % for power analysis (default 15)",
            "type": "number",
            "exclusiveMinimum": 0
          },
          "exposureStart": {
            "description": "exposure start date; defaults to the campaign start",
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proveIt": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "proveIt"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/prove-it",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "testMarket": {
              "description": "test market key (default \"london\")",
              "type": "string"
            },
            "expectedLiftPct": {
              "description": "expected lift % for power analysis (default 15)",
              "type": "number",
              "exclusiveMinimum": 0
            },
            "exposureStart": {
              "description": "exposure start date; defaults to the campaign start",
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            }
          },
          "additionalProperties": false
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_campaign_insights",
      "title": "Get the full campaign insights read",
      "description": "One call for the analysis a Head of Data would present to a client: PACING (planned vs delivered to date, and a run-rate projection to flight end), EFFICIENCY (blended and per-channel CPM/CPA plus a weekly trend), OUTCOMES, modeled REACH, the MIX MODEL verdict, INCREMENTALITY, the optimizer RECOMMENDATIONS, and — read this one — LIMITATIONS. Two things are deliberate and must be carried through to whatever you produce. The mix model usually reports status \"not-ready\" with the weeks it has against the weeks it needs; that refusal IS the finding, not a gap to fill with your own estimate. And `limitations` lists what this analysis cannot claim, derived from the actual data — surface it with the numbers rather than as a footnote, because every line in it is a claim someone would otherwise make by mistake. The projection is a run-rate, not a forecast model.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id, e.g. cmp-1a2b3c4d"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/insights",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id, e.g. cmp-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "generate_optimizations",
      "title": "Generate campaign optimisation proposals",
      "description": "Analyse the campaign plan, delivery and observed outcomes and replace its pending optimisation set with fresh explainable proposals. This creates recommendations only; it does not approve a budget reallocation or change a live provider. Previously approved or rejected decisions remain immutable. Review the returned confidence, rationale and expected impact, then ask the user before approve_optimization or reject_optimization.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "campaign id to analyse"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposals": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "proposals"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/optimize",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "campaign id to analyse"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_optimizations",
      "title": "List optimisation proposals",
      "description": "List tenant-scoped optimisation proposals newest first, optionally filtered by campaign and status. Use this to reload proposal state immediately before an approval or rejection; only pending proposals can be decided.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "description": "optional campaign filter",
            "type": "string",
            "minLength": 1
          },
          "status": {
            "description": "optional decision-status filter",
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ]
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposals": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "proposals"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/optimizations",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "description": "optional campaign filter",
              "type": "string",
              "minLength": 1
            },
            "status": {
              "description": "optional decision-status filter",
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "rejected"
              ]
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "approve_optimization",
      "title": "Approve an optimisation proposal",
      "description": "Approve one pending optimisation proposal after showing the user its exact budget movement, confidence, expected impact and rationale. Reallocation approvals mutate the stored plan and sandbox execution budgets, with both affected sides reforecast. Live upstream budget updates fail closed as UPSTREAM_UPDATE_UNSUPPORTED. The pending-to-approved claim is atomic and audit logged.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "optimizationId": {
            "type": "string",
            "minLength": 1,
            "description": "pending proposal id"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "optimizationId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "proposal"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/optimizations/{optimizationId}/approve",
        "pathFields": [
          "optimizationId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "optimizationId": {
              "type": "string",
              "minLength": 1,
              "description": "pending proposal id"
            }
          },
          "additionalProperties": false,
          "required": [
            "optimizationId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "optimization.approve",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "reject_optimization",
      "title": "Reject an optimisation proposal",
      "description": "Reject one pending optimisation proposal after the user has reviewed it. Rejection is a durable, audit-logged human decision and the same deterministic proposal will not be resurrected as pending by a later generation run.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "optimizationId": {
            "type": "string",
            "minLength": 1,
            "description": "pending proposal id"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          }
        },
        "required": [
          "optimizationId",
          "agentStepId",
          "expectedActionDigest"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "proposal": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "proposal"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/optimizations/{optimizationId}/reject",
        "pathFields": [
          "optimizationId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "optimizationId": {
              "type": "string",
              "minLength": 1,
              "description": "pending proposal id"
            }
          },
          "additionalProperties": false,
          "required": [
            "optimizationId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "optimization.reject",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "body": null,
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "mmm_readiness",
      "title": "Can this advertiser support a marketing-mix model?",
      "description": "Ask BEFORE attempting an MMM. Reports weeks of usable history against what is required, which channels carry material spend, whether each channel's spend actually VARIES (a channel held at a flat budget cannot be separated from the baseline — this is the failure mode that makes naive mix models confidently wrong), collinearity between channels that move together, outcome density, and a plain-English list of what is missing with what to run instead. Returns 200 whether or not it is ready: \"not yet, and here is why\" is a valid answer, not an error. Most advertisers running short pilots will NOT be ready, and that is the expected result.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grain": {
            "description": "spend columns per channel (default) or per campaign×channel",
            "type": "string",
            "enum": [
              "channel",
              "campaign-channel"
            ]
          },
          "outcome": {
            "description": "which tracked outcome is the dependent variable; default conversion",
            "type": "string",
            "enum": [
              "conversion",
              "pageview"
            ]
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/measurement/mmm/readiness",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "grain": {
              "description": "spend columns per channel (default) or per campaign×channel",
              "type": "string",
              "enum": [
                "channel",
                "campaign-channel"
              ]
            },
            "outcome": {
              "description": "which tracked outcome is the dependent variable; default conversion",
              "type": "string",
              "enum": [
                "conversion",
                "pageview"
              ]
            }
          },
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "run_micro_mmm",
      "title": "Run the marketing-mix model",
      "description": "Fit a weekly marketing-mix model across this advertiser's channels: geometric adstock (carryover), a diminishing-returns saturation curve, and ridge-regularised regression. Returns per-channel contribution, marginal cost per outcome, and fit quality. Every number is labeled modeled and carries caveats — render the caveats WITH the numbers, not behind a tooltip, and never present a weak fit as an allocation recommendation. When the data cannot support a model this REFUSES with 422 and the full readiness report naming what is missing and what to run instead (usually a geo-lift). That refusal is the correct answer — do not retry with different parameters to force a number out of it, and do not substitute your own estimate.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grain": {
            "description": "spend column granularity",
            "type": "string",
            "enum": [
              "channel",
              "campaign-channel"
            ]
          },
          "outcome": {
            "description": "dependent variable",
            "type": "string",
            "enum": [
              "conversion",
              "pageview"
            ]
          }
        }
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/measurement/mmm",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "grain": {
              "description": "spend column granularity",
              "type": "string",
              "enum": [
                "channel",
                "campaign-channel"
              ]
            },
            "outcome": {
              "description": "dependent variable",
              "type": "string",
              "enum": [
                "conversion",
                "pageview"
              ]
            }
          },
          "additionalProperties": false
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_journeys",
      "title": "Get cross-channel journeys",
      "description": "Exposure-ledger journeys for a campaign: journey stages (e.g. exposed on DOOH but not CTV), cross-channel frequency, per-channel and deduped reach, and ranked next-best-channel audience-sync suggestions (each flagged syncAvailable when an adapter can actually run it — feed one into sync_audience).",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id"
          }
        },
        "required": [
          "campaignId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/campaigns/{campaignId}/journeys",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "sync_audience",
      "title": "Sync a ledger audience to a channel",
      "description": "Build an audience from the exposure ledger (households exposed on some channels and not others) and sync it to an adapter on the target channel as an inclusion or suppression audience — the sequencing primitive (e.g. billboard-exposed households retargeted on CTV). Returns the sync record with matched count and key-grade breakdown. Copy adapterKey and executionMode from the selected get_journeys suggestion exactly; the API rejects provider or mode drift.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "description": "campaign id whose ledger to query"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "exposedOn": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            },
            "description": "channels the audience WAS exposed on"
          },
          "notExposedOn": {
            "default": [],
            "description": "channels the audience was NOT exposed on",
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            }
          },
          "channel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ],
            "description": "target channel to sync the audience to"
          },
          "purpose": {
            "type": "string",
            "enum": [
              "inclusion",
              "suppression"
            ],
            "description": "use the audience to include or suppress"
          },
          "adapterKey": {
            "type": "string",
            "description": "exact adapterKey returned by the selected get_journeys suggestion"
          },
          "executionMode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ],
            "description": "exact executionMode returned with the selected get_journeys suggestion"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest",
          "exposedOn",
          "channel",
          "purpose",
          "adapterKey",
          "executionMode"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "sync": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "sync"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/campaigns/{campaignId}/sync-audience",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "description": "campaign id whose ledger to query"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "audience.sync",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "exposedOn": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ctv",
                  "audio",
                  "tv",
                  "cinema",
                  "dooh",
                  "search",
                  "social"
                ]
              },
              "description": "channels the audience WAS exposed on"
            },
            "notExposedOn": {
              "default": [],
              "description": "channels the audience was NOT exposed on",
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ctv",
                  "audio",
                  "tv",
                  "cinema",
                  "dooh",
                  "search",
                  "social"
                ]
              }
            },
            "channel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ],
              "description": "target channel to sync the audience to"
            },
            "purpose": {
              "type": "string",
              "enum": [
                "inclusion",
                "suppression"
              ],
              "description": "use the audience to include or suppress"
            },
            "adapterKey": {
              "type": "string",
              "description": "exact adapterKey returned by the selected get_journeys suggestion"
            },
            "executionMode": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ],
              "description": "exact executionMode returned with the selected get_journeys suggestion"
            }
          },
          "additionalProperties": false,
          "required": [
            "exposedOn",
            "channel",
            "purpose",
            "adapterKey",
            "executionMode"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "upload_creative",
      "title": "Supply an existing creative file for this campaign",
      "description": "Upload the buyer’s existing creative bytes to a permitted campaign channel. Provide the original file as base64, its MIME type and supplier format; the API verifies and stores the asset and returns the created creative. File size is at most 20 MiB decoded. Uploading is separate from provider approval or booking: inspect the resulting precheck/readiness and attach the creative before requesting supplier booking. Inline HTTP uploads must fit the configured MCP body limit.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1
          },
          "channel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "format": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "copyText": {
            "type": "string",
            "maxLength": 20000
          },
          "audioDelivery": {
            "type": "object",
            "properties": {
              "tagline": {
                "type": "string",
                "minLength": 2,
                "maxLength": 40
              },
              "destinationUrl": {
                "type": "string",
                "format": "uri"
              },
              "callToAction": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 16
              }
            },
            "required": [
              "tagline",
              "destinationUrl",
              "callToAction",
              "language"
            ],
            "additionalProperties": false
          },
          "fileName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "mediaType": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "video/mp4",
              "video/webm",
              "audio/mpeg",
              "audio/wav"
            ]
          },
          "base64": {
            "type": "string",
            "minLength": 4,
            "maxLength": 27962028,
            "pattern": "^[A-Za-z0-9+/]*={0,2}$"
          }
        },
        "required": [
          "campaignId",
          "channel",
          "name",
          "format",
          "fileName",
          "mediaType",
          "base64"
        ],
        "additionalProperties": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creative": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "creative"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/upload",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1
            },
            "channel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "format": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "copyText": {
              "type": "string",
              "maxLength": 20000
            },
            "audioDelivery": {
              "type": "object",
              "properties": {
                "tagline": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 40
                },
                "destinationUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "callToAction": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "language": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 16
                }
              },
              "required": [
                "tagline",
                "destinationUrl",
                "callToAction",
                "language"
              ],
              "additionalProperties": false
            },
            "fileName": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "mediaType": {
              "type": "string",
              "enum": [
                "image/jpeg",
                "image/png",
                "video/mp4",
                "video/webm",
                "audio/mpeg",
                "audio/wav"
              ]
            },
            "base64": {
              "type": "string",
              "minLength": 4,
              "maxLength": 27962028,
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId",
            "channel",
            "name",
            "format",
            "fileName",
            "mediaType",
            "base64"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "generate_creative",
      "title": "Generate creative for a channel",
      "description": "Generate channel-appropriate ad creative (copy + renditions) from a brief, grounded in a persona passed directly or inherited from campaignId: e.g. a 30s audio script, DOOH copy, CTV storyboard, responsive search assets, or portable paid-social copy and asset direction. Returns the stored creative, its per-channel renditions, and an automatic clearance precheck. Then use submit_creative to send it to an adapter.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "personaId": {
            "description": "persona the creative should speak to; optional when campaignId resolves one",
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ],
            "description": "channel to generate for"
          },
          "product": {
            "type": "string",
            "minLength": 1,
            "description": "the product or brand being advertised"
          },
          "proposition": {
            "type": "string",
            "minLength": 3,
            "description": "the single message the ad should land, e.g. \"Ship code twice as fast\""
          },
          "tone": {
            "default": "bold",
            "description": "creative tone",
            "type": "string",
            "enum": [
              "bold",
              "premium",
              "friendly",
              "urgent",
              "witty"
            ]
          },
          "mandatories": {
            "description": "copy elements that must appear verbatim (legal lines, brand taglines); max 4 lines of 60 characters",
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "campaignId": {
            "description": "campaign to attach the creative to",
            "type": "string"
          }
        },
        "required": [
          "channel",
          "product",
          "proposition"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creative": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "creative"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/generate",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "personaId": {
              "description": "persona the creative should speak to; optional when campaignId resolves one",
              "type": "string"
            },
            "channel": {
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ],
              "description": "channel to generate for"
            },
            "campaignId": {
              "description": "campaign to attach the creative to",
              "type": "string"
            },
            "brief": {
              "type": "object",
              "properties": {
                "product": {
                  "type": "string",
                  "minLength": 1,
                  "description": "the product or brand being advertised"
                },
                "proposition": {
                  "type": "string",
                  "minLength": 3,
                  "description": "the single message the ad should land, e.g. \"Ship code twice as fast\""
                },
                "tone": {
                  "default": "bold",
                  "description": "creative tone",
                  "type": "string",
                  "enum": [
                    "bold",
                    "premium",
                    "friendly",
                    "urgent",
                    "witty"
                  ]
                },
                "mandatories": {
                  "description": "copy elements that must appear verbatim (legal lines, brand taglines); max 4 lines of 60 characters",
                  "maxItems": 4,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                }
              },
              "additionalProperties": false,
              "required": [
                "product",
                "proposition",
                "tone"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "channel",
            "brief"
          ]
        },
        "bodyMapping": {
          "passthroughOtherFields": true,
          "brief": {
            "product": "product",
            "proposition": "proposition",
            "tone": "tone",
            "mandatories": "mandatories"
          }
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "precheck_creative",
      "title": "Precheck creative clearance",
      "description": "Run the AI clearance precheck on an existing creative: predicted UK CAP/BCAP, Clearcast/CAA, publisher, and search/social platform-review flags with rule citations, before you submit anywhere. Pass any factual claims the copy makes so substantiation requirements are checked too.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string",
            "description": "creative id, e.g. cr-1a2b3c4d"
          },
          "claims": {
            "description": "factual claims made in the copy",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "creativeId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "precheck": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "precheck"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/{creativeId}/precheck",
        "pathFields": [
          "creativeId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "creativeId": {
              "type": "string",
              "description": "creative id, e.g. cr-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "claims": {
              "description": "factual claims made in the copy",
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "revise_creative",
      "title": "Revise creative with your own copy",
      "description": "Rewrite a generated DOOH creative in your own words and re-render it through the same layout, brand kit and legal strip. Supply only the fields you want to change; the rest carry over from the creative you are revising. The result is a NEW versioned creative linked by sourceCreativeId — the original is never mutated, because it may already be trafficking. Copy is clamped to the format limits (a six-sheet cannot show more) and any field that had to be trimmed is named in clampedFields, so shortening it yourself keeps the wording exact. The clearance precheck re-runs on the revised copy, so an edit cannot dodge it. DOOH only — the storyboard channels would need the copy re-timed against scene durations, which is a different operation and is not pretended here.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string",
            "minLength": 1,
            "description": "generated DOOH creative to revise, e.g. cr-1a2b3c4d"
          },
          "headline": {
            "description": "replacement headline",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "subline": {
            "description": "replacement subline",
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "cta": {
            "description": "replacement call to action",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "mandatories": {
            "description": "replacement legal lines; max 4 of 60 characters, never truncated",
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          }
        },
        "required": [
          "creativeId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string"
          },
          "creative": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "creativeId",
          "creative"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/{creativeId}/revise",
        "pathFields": [
          "creativeId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "creativeId": {
              "type": "string",
              "minLength": 1,
              "description": "generated DOOH creative to revise, e.g. cr-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "bodySchema": {
          "type": "object",
          "properties": {
            "headline": {
              "description": "replacement headline",
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "subline": {
              "description": "replacement subline",
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            "cta": {
              "description": "replacement call to action",
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "mandatories": {
              "description": "replacement legal lines; max 4 of 60 characters, never truncated",
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              }
            }
          },
          "additionalProperties": false
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "set_campaign_creatives",
      "title": "Select creatives for a campaign",
      "description": "Replace a pending campaign’s creative selection with existing reusable creatives. Every selected creative must belong to the advertiser and match a channel in the campaign plan. Do this before activation; launch_campaign requires at least one same-channel creative with a completed, non-failing policy precheck for every campaign line. The selection locks once activation starts.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaignId": {
            "type": "string",
            "minLength": 1,
            "description": "pending campaign whose creative selection is replaced"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "creativeIds": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "description": "reusable creative ids; pass an empty array to clear the prelaunch selection"
          }
        },
        "required": [
          "campaignId",
          "agentStepId",
          "expectedActionDigest",
          "creativeIds"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "campaign"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/campaigns/{campaignId}/creatives",
        "pathFields": [
          "campaignId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "campaignId": {
              "type": "string",
              "minLength": 1,
              "description": "pending campaign whose creative selection is replaced"
            }
          },
          "additionalProperties": false,
          "required": [
            "campaignId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "campaign.creatives.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "creativeIds": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "reusable creative ids; pass an empty array to clear the prelaunch selection"
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeIds"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "submit_creative",
      "title": "Submit creative to an adapter",
      "description": "Submit an existing creative to a channel adapter for approval/trafficking (the adapter must have the \"creative\" capability — see list_connections). Returns the submission status and any adapter feedback.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string",
            "description": "creative id to submit"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "adapterKey": {
            "type": "string",
            "description": "adapter key, e.g. \"stackadapt\", \"vistar\""
          },
          "channel": {
            "description": "override channel (defaults to the creative’s channel)",
            "type": "string",
            "enum": [
              "ctv",
              "audio",
              "tv",
              "cinema",
              "dooh",
              "search",
              "social"
            ]
          }
        },
        "required": [
          "creativeId",
          "agentStepId",
          "expectedActionDigest",
          "adapterKey"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "submission": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "submission"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/{creativeId}/submit",
        "pathFields": [
          "creativeId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "creativeId": {
              "type": "string",
              "description": "creative id to submit"
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "creative.submit",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "adapterKey": {
              "type": "string",
              "description": "adapter key, e.g. \"stackadapt\", \"vistar\""
            },
            "channel": {
              "description": "override channel (defaults to the creative’s channel)",
              "type": "string",
              "enum": [
                "ctv",
                "audio",
                "tv",
                "cinema",
                "dooh",
                "search",
                "social"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "adapterKey"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_asset_pricing",
      "title": "Get the current AI asset price ladder",
      "description": "The AI asset production price ladder currently in force. Retail prices are derived server-side, never hardcoded: retail = provider cost basis ÷ (1 − margin%/100), with a configurable margin (default 80%, i.e. cost × 5) and a minimum-charge floor — cost bases, margin, and floor are all env-overridable on the API, so ALWAYS read the ladder from here instead of assuming amounts. Covers every kind: image per render, vo per script, music per track, video per second by tier (draft/standard/premium), and motion (programmatic SVG loops carry zero provider cost so the floor applies; rendered loops bill per second at the draft video basis). Amounts are GBP minor units (pence). Check this before produce_asset to quote the exact charge.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "pricing": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "pricing"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/assets/pricing",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "produce_asset",
      "title": "Produce an AI asset (hard wallet charge)",
      "description": "Produce a finished AI asset attached to an existing creative: video (CTV/cinema 16:9; DOOH 9:16 or 16:9 loops), image (DOOH stills), vo (audio-channel voiceover of the creative script), music (audio bed), or motion — an animated text loop (\"moving image\") for DOOH/display where the headline/subline/CTA slide and fade in, hold, and exit, looping forever. Motion has two modes: \"programmatic\" (deterministic animated SVG generated in-process, ready immediately) and \"rendered\" (a provider-rendered 5–10s video loop). IMPORTANT — production is a SEPARATE HARD wallet charge, debited immediately at submit and stated in the response (chargedMinor + remaining wallet balance). Definite provider failures are auto-refunded; an ambiguous acceptance becomes terminal reconciliation-required with the charge retained and retry disabled to prevent duplicate production. Prices are cost-plus at a configured margin over provider cost — call get_asset_pricing for the current ladder. Never blended into media-spend platform fees. Fails with 402 INSUFFICIENT_FUNDS (including shortfallMinor) when the wallet cannot cover it — top up first. Unset fields default sensibly from the creative’s channel and content. Then poll get_asset_status until ready.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creativeId": {
            "type": "string",
            "description": "existing creative the asset attaches to, e.g. cr-1a2b3c4d"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200,
            "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
          },
          "kind": {
            "type": "string",
            "enum": [
              "video",
              "image",
              "vo",
              "music",
              "motion"
            ],
            "description": "what to produce: video | image | vo (voiceover) | music (bed) | motion (animated text loop)"
          },
          "tier": {
            "description": "video only: quality/price tier — draft | standard | premium (default comes from the creative’s channel, e.g. cinema → premium); per-second rates come from get_asset_pricing",
            "type": "string",
            "enum": [
              "draft",
              "standard",
              "premium"
            ]
          },
          "durationSeconds": {
            "description": "video 5–10s and rendered motion 5–10s (both billed per second), music 5–180s, programmatic motion 5–15s loop; ignored for image/vo",
            "type": "integer",
            "minimum": 5,
            "maximum": 180
          },
          "promptOverride": {
            "description": "override the auto-derived content: the video/image prompt, the vo script, or the music brief (default is built from the creative’s copy/storyboard/script); not used for motion — pass headline/subline/cta instead",
            "type": "string",
            "minLength": 1
          },
          "headline": {
            "description": "motion only: headline text that animates in/out (default: from the creative’s copy)",
            "type": "string",
            "minLength": 1
          },
          "subline": {
            "description": "motion only: supporting line staggered behind the headline (default: from the creative)",
            "type": "string",
            "minLength": 1
          },
          "cta": {
            "description": "motion only: call-to-action text shown last (default: from the creative)",
            "type": "string",
            "minLength": 1
          },
          "resolution": {
            "description": "motion only: DOOH screen resolution — 1080x1920 portrait D6, 1920x1080 landscape HD, 1400x400 ribbon banner (default fits the creative’s channel)",
            "type": "string",
            "enum": [
              "1080x1920",
              "1920x1080",
              "1400x400"
            ]
          },
          "mode": {
            "description": "motion only: \"programmatic\" = deterministic animated SVG loop generated in-process (zero provider cost — priced at the minimum charge; ready immediately); \"rendered\" = provider video loop billed per second (default: programmatic)",
            "type": "string",
            "enum": [
              "programmatic",
              "rendered"
            ]
          }
        },
        "required": [
          "creativeId",
          "agentStepId",
          "expectedActionDigest",
          "idempotencyKey",
          "kind"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "job": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "job"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/creatives/{creativeId}/assets",
        "pathFields": [
          "creativeId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "creativeId": {
              "type": "string",
              "description": "existing creative the asset attaches to, e.g. cr-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "creativeId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "asset.submit",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotencyKey",
                "kind"
              ],
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200,
                  "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
                },
                "kind": {
                  "const": "video",
                  "type": "string"
                },
                "spec": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "tier": {
                      "description": "video only: quality/price tier — draft | standard | premium (default comes from the creative’s channel, e.g. cinema → premium); per-second rates come from get_asset_pricing",
                      "type": "string",
                      "enum": [
                        "draft",
                        "standard",
                        "premium"
                      ]
                    },
                    "durationSeconds": {
                      "description": "video 5–10s and rendered motion 5–10s (both billed per second), music 5–180s, programmatic motion 5–15s loop; ignored for image/vo",
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 180
                    },
                    "prompt": {
                      "description": "override the auto-derived content: the video/image prompt, the vo script, or the music brief (default is built from the creative’s copy/storyboard/script); not used for motion — pass headline/subline/cta instead",
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotencyKey",
                "kind"
              ],
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200,
                  "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
                },
                "kind": {
                  "const": "image",
                  "type": "string"
                },
                "spec": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "prompt": {
                      "description": "override the auto-derived content: the video/image prompt, the vo script, or the music brief (default is built from the creative’s copy/storyboard/script); not used for motion — pass headline/subline/cta instead",
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotencyKey",
                "kind"
              ],
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200,
                  "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
                },
                "kind": {
                  "const": "vo",
                  "type": "string"
                },
                "spec": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "script": {
                      "description": "override the auto-derived content: the video/image prompt, the vo script, or the music brief (default is built from the creative’s copy/storyboard/script); not used for motion — pass headline/subline/cta instead",
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotencyKey",
                "kind"
              ],
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200,
                  "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
                },
                "kind": {
                  "const": "music",
                  "type": "string"
                },
                "spec": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "durationSeconds": {
                      "description": "video 5–10s and rendered motion 5–10s (both billed per second), music 5–180s, programmatic motion 5–15s loop; ignored for image/vo",
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 180
                    },
                    "brief": {
                      "description": "override the auto-derived content: the video/image prompt, the vo script, or the music brief (default is built from the creative’s copy/storyboard/script); not used for motion — pass headline/subline/cta instead",
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            },
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotencyKey",
                "kind"
              ],
              "properties": {
                "idempotencyKey": {
                  "type": "string",
                  "minLength": 8,
                  "maxLength": 200,
                  "description": "caller-generated key for this intended production; reuse it after a timeout/network error to receive the original job without another debit or provider submission"
                },
                "kind": {
                  "const": "motion",
                  "type": "string"
                },
                "spec": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "durationSeconds": {
                      "description": "video 5–10s and rendered motion 5–10s (both billed per second), music 5–180s, programmatic motion 5–15s loop; ignored for image/vo",
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 180
                    },
                    "headline": {
                      "description": "motion only: headline text that animates in/out (default: from the creative’s copy)",
                      "type": "string",
                      "minLength": 1
                    },
                    "subline": {
                      "description": "motion only: supporting line staggered behind the headline (default: from the creative)",
                      "type": "string",
                      "minLength": 1
                    },
                    "cta": {
                      "description": "motion only: call-to-action text shown last (default: from the creative)",
                      "type": "string",
                      "minLength": 1
                    },
                    "resolution": {
                      "description": "motion only: DOOH screen resolution — 1080x1920 portrait D6, 1920x1080 landscape HD, 1400x400 ribbon banner (default fits the creative’s channel)",
                      "type": "string",
                      "enum": [
                        "1080x1920",
                        "1920x1080",
                        "1400x400"
                      ]
                    },
                    "mode": {
                      "description": "motion only: \"programmatic\" = deterministic animated SVG loop generated in-process (zero provider cost — priced at the minimum charge; ready immediately); \"rendered\" = provider video loop billed per second (default: programmatic)",
                      "type": "string",
                      "enum": [
                        "programmatic",
                        "rendered"
                      ]
                    }
                  }
                }
              }
            }
          ]
        },
        "bodyMapping": {
          "idempotencyKey": "idempotencyKey",
          "kind": "kind",
          "spec": {
            "video": {
              "tier": "tier",
              "durationSeconds": "durationSeconds",
              "prompt": "promptOverride"
            },
            "image": {
              "prompt": "promptOverride"
            },
            "vo": {
              "script": "promptOverride"
            },
            "music": {
              "durationSeconds": "durationSeconds",
              "brief": "promptOverride"
            },
            "motion": {
              "durationSeconds": "durationSeconds",
              "headline": "headline",
              "subline": "subline",
              "cta": "cta",
              "resolution": "resolution",
              "mode": "mode"
            }
          },
          "omission": "Only supplied fields for the selected kind are included; an empty spec is omitted."
        },
        "responseMapping": "MCP preserves the REST object and adds a human-readable charged note when chargedMinor is present."
      }
    },
    {
      "name": "get_asset_status",
      "title": "Get AI asset job status",
      "description": "Check an AI asset production job by id (from produce_asset). Jobs move submitting → queued → generating → ready, failed, or reconciliation-required. Poll while submitting/queued/generating; the other three states are terminal. Provider renders typically take tens of seconds to a few minutes (vo and programmatic motion complete synchronously at submit). When ready, outputUrl is the produced file (video/image/audio/animated SVG) ready to download or attach; sandbox mode (no provider keys) returns deterministic placeholder URLs. Failed means a definite provider failure: the wallet charge was refunded and retry creates a fresh debit. Reconciliation-required means provider acceptance is unknown: the charge is retained and retry is disabled to prevent duplicate production. Hand that state to a permitted human in Operator, then poll this tool; an MCP identity cannot assert the provider outcome.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "assetJobId": {
            "type": "string",
            "description": "asset job id, e.g. asset-1a2b3c4d"
          }
        },
        "required": [
          "assetJobId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "job": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "job"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/assets/{assetJobId}",
        "pathFields": [
          "assetJobId"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "assetJobId": {
              "type": "string",
              "description": "asset job id, e.g. asset-1a2b3c4d"
            }
          },
          "additionalProperties": false,
          "required": [
            "assetJobId"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "list_connections",
      "title": "List adapter connections",
      "description": "List every channel adapter (StackAdapt, Vistar, Sky AdSmart, DCM cinema, …) with its metadata (channels, capabilities, rail), verification provenance, current mode (sandbox/live), and whether credentials are set. Sandbox mode returns realistic deterministic data with zero credentials.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "connections": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "connections"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/connections",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_supplier_dossier",
      "title": "Inspect a supplier dossier",
      "description": "Read the privacy-safe agent projection of the tenant-owned supplier dossier for one adapter, including effective status, revision, provenance freshness, commercial access, supported operations, billing, technical API/MCP evidence, privacy, support and explicit readiness blockers. Credentials, contacts, source/artifact references, digests, reviewer identities and free-text notes are never returned. This tool cannot draft, update or verify a dossier; those authority changes remain human-only in Operator.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "adapter key from list_connections"
          }
        },
        "required": [
          "key"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "dossier": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "adapterKey": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "verified",
                  "blocked"
                ]
              },
              "effectiveStatus": {
                "type": "string",
                "enum": [
                  "draft",
                  "verified",
                  "blocked",
                  "stale"
                ]
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "accessClass": {
                "type": "string",
                "enum": [
                  "open",
                  "own-account",
                  "approved",
                  "contract",
                  "infrastructure"
                ]
              },
              "verificationBlockers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "provenanceCurrent": {
                "type": "boolean"
              },
              "connectionBindingCurrent": {
                "type": "boolean"
              },
              "verifiedAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "content": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "number",
                    "const": 1
                  },
                  "identity": {
                    "type": "object",
                    "properties": {
                      "supplierName": {
                        "type": "string"
                      },
                      "productName": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "ctv",
                            "audio",
                            "tv",
                            "cinema",
                            "dooh",
                            "search",
                            "social"
                          ]
                        }
                      },
                      "availableMarkets": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "supplierName",
                      "productName",
                      "channels",
                      "availableMarkets"
                    ],
                    "additionalProperties": false
                  },
                  "commercialAccess": {
                    "type": "object",
                    "properties": {
                      "accessClass": {
                        "type": "string",
                        "enum": [
                          "open",
                          "own-account",
                          "approved",
                          "contract",
                          "infrastructure"
                        ]
                      },
                      "accountScope": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "own-account-only",
                          "agency-multi-advertiser",
                          "reseller",
                          "managed-service"
                        ]
                      },
                      "currentState": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "not-started",
                          "application-pending",
                          "approved",
                          "contracted",
                          "suspended",
                          "rejected",
                          "not-available"
                        ]
                      },
                      "contractRequired": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "multiAdvertiserUseApproved": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "resaleApproved": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "onboardingLeadTime": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "minimumBusinessDays": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "maximumBusinessDays": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "minimumBusinessDays",
                              "maximumBusinessDays"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "minimumCommitment": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amountMinor": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "currency": {
                                "type": "string",
                                "enum": [
                                  "GBP",
                                  "USD",
                                  "EUR"
                                ]
                              }
                            },
                            "required": [
                              "amountMinor",
                              "currency"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "accessClass",
                      "accountScope",
                      "currentState",
                      "contractRequired",
                      "multiAdvertiserUseApproved",
                      "resaleApproved",
                      "onboardingLeadTime",
                      "minimumCommitment"
                    ],
                    "additionalProperties": false
                  },
                  "operations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "operation": {
                          "type": "string",
                          "enum": [
                            "forecast",
                            "providerForecast",
                            "postcodeClassification",
                            "identityMapping",
                            "identityOptOut",
                            "activate",
                            "pause",
                            "resume",
                            "creative",
                            "report",
                            "audienceSync",
                            "deals",
                            "keywordSuggestions",
                            "conversionGoals",
                            "analytics",
                            "inventory"
                          ]
                        },
                        "verificationStatus": {
                          "type": "string",
                          "enum": [
                            "unknown",
                            "sandbox-only",
                            "stub",
                            "client-built",
                            "contract-tested",
                            "spend-tested",
                            "report-verified"
                          ]
                        },
                        "liveAccess": {
                          "type": "string",
                          "enum": [
                            "unknown",
                            "not-approved",
                            "approved",
                            "suspended",
                            "not-applicable"
                          ]
                        },
                        "executionMode": {
                          "type": "string",
                          "enum": [
                            "unknown",
                            "rest-api",
                            "graphql-api",
                            "official-mcp",
                            "file-transfer",
                            "portal-workflow",
                            "email-workflow",
                            "managed-service",
                            "none"
                          ]
                        },
                        "risk": {
                          "type": "string",
                          "enum": [
                            "read-only",
                            "non-spend-write",
                            "spend-authorizing",
                            "personal-data-transfer"
                          ]
                        },
                        "requiredOAuthScopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "requiredCredentialFields": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "sandboxAvailable": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "supportsIdempotency": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "supportsMultiAdvertiser": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "blockers": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "operation",
                        "verificationStatus",
                        "liveAccess",
                        "executionMode",
                        "risk",
                        "requiredOAuthScopes",
                        "requiredCredentialFields",
                        "sandboxAvailable",
                        "supportsIdempotency",
                        "supportsMultiAdvertiser",
                        "blockers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "billing": {
                    "type": "object",
                    "properties": {
                      "billingModel": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "prepaid",
                          "card-on-file",
                          "postpaid-invoice",
                          "platform-billed",
                          "managed-service",
                          "mixed",
                          "not-applicable"
                        ]
                      },
                      "supportedCurrencies": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "GBP",
                            "USD",
                            "EUR"
                          ]
                        }
                      },
                      "requiresPreFunding": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "paymentTermsDays": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "spendCapBehavior": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "vendor-hard-cap",
                          "vendor-soft-cap",
                          "platform-only",
                          "not-supported",
                          "not-applicable"
                        ]
                      },
                      "minimumCampaignSpend": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amountMinor": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "currency": {
                                "type": "string",
                                "enum": [
                                  "GBP",
                                  "USD",
                                  "EUR"
                                ]
                              }
                            },
                            "required": [
                              "amountMinor",
                              "currency"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "minimumMonthlyCommitment": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "amountMinor": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "currency": {
                                "type": "string",
                                "enum": [
                                  "GBP",
                                  "USD",
                                  "EUR"
                                ]
                              }
                            },
                            "required": [
                              "amountMinor",
                              "currency"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "billingModel",
                      "supportedCurrencies",
                      "requiresPreFunding",
                      "paymentTermsDays",
                      "spendCapBehavior",
                      "minimumCampaignSpend",
                      "minimumMonthlyCommitment"
                    ],
                    "additionalProperties": false
                  },
                  "technical": {
                    "type": "object",
                    "properties": {
                      "integrationModes": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "unknown",
                            "rest-api",
                            "graphql-api",
                            "official-mcp",
                            "file-transfer",
                            "portal-workflow",
                            "email-workflow",
                            "managed-service",
                            "none"
                          ]
                        }
                      },
                      "apiVersion": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "authMethod": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "none",
                          "api-key",
                          "basic",
                          "oauth2-authorization-code",
                          "oauth2-client-credentials",
                          "rsa-signature",
                          "mutual-tls",
                          "vendor-session",
                          "manual"
                        ]
                      },
                      "credentialFields": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "required": {
                              "type": "boolean"
                            },
                            "secret": {
                              "type": "boolean"
                            },
                            "rotates": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "required",
                            "secret",
                            "rotates"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "sandboxClass": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "true-sandbox",
                          "test-account",
                          "production-test-only",
                          "synthetic-only",
                          "unavailable"
                        ]
                      },
                      "idempotencyClass": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "native-key",
                          "request-header",
                          "natural-key-only",
                          "not-supported",
                          "not-applicable"
                        ]
                      },
                      "paginationClass": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "cursor",
                          "page",
                          "offset",
                          "stream",
                          "none"
                        ]
                      },
                      "supportsWebhooks": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "usesAsynchronousJobs": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "productionTestingRequired": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "mcp": {
                        "type": "object",
                        "properties": {
                          "availability": {
                            "type": "string",
                            "enum": [
                              "unknown",
                              "not-offered",
                              "supplier-hosted-beta",
                              "supplier-hosted-ga",
                              "official-self-hosted",
                              "third-party-only"
                            ]
                          },
                          "transports": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "unknown",
                                "streamable-http",
                                "stdio",
                                "sse"
                              ]
                            }
                          },
                          "protocolVersions": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "authMethod": {
                            "type": "string",
                            "enum": [
                              "unknown",
                              "none",
                              "api-key",
                              "basic",
                              "oauth2-authorization-code",
                              "oauth2-client-credentials",
                              "rsa-signature",
                              "mutual-tls",
                              "vendor-session",
                              "manual"
                            ]
                          },
                          "tools": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "risk": {
                                  "type": "string",
                                  "enum": [
                                    "read-only",
                                    "non-spend-write",
                                    "spend-authorizing",
                                    "personal-data-transfer"
                                  ]
                                }
                              },
                              "required": [
                                "name",
                                "risk"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "availability",
                          "transports",
                          "protocolVersions",
                          "authMethod",
                          "tools"
                        ],
                        "additionalProperties": false
                      },
                      "blockers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "integrationModes",
                      "apiVersion",
                      "authMethod",
                      "credentialFields",
                      "sandboxClass",
                      "idempotencyClass",
                      "paginationClass",
                      "supportsWebhooks",
                      "usesAsynchronousJobs",
                      "productionTestingRequired",
                      "mcp",
                      "blockers"
                    ],
                    "additionalProperties": false
                  },
                  "creative": {
                    "type": "object",
                    "properties": {
                      "submissionMode": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "api",
                          "portal",
                          "email",
                          "managed-service",
                          "not-applicable"
                        ]
                      },
                      "formats": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "mimeTypes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "fileExtensions": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "dimensions": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "durationsSeconds": {
                              "type": "array",
                              "items": {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "maximumBytes": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "name",
                            "mimeTypes",
                            "fileExtensions",
                            "dimensions",
                            "durationsSeconds",
                            "maximumBytes"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "requiresPreApproval": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "externalCreativeRefReturned": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "approvalStatusReadable": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "approvalBoundToExactBytes": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "reviewSlaBusinessDays": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "minimumBusinessDays": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "maximumBusinessDays": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "minimumBusinessDays",
                              "maximumBusinessDays"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "approvalExpiryDays": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "blockers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "submissionMode",
                      "formats",
                      "requiresPreApproval",
                      "externalCreativeRefReturned",
                      "approvalStatusReadable",
                      "approvalBoundToExactBytes",
                      "reviewSlaBusinessDays",
                      "approvalExpiryDays",
                      "blockers"
                    ],
                    "additionalProperties": false
                  },
                  "privacy": {
                    "type": "object",
                    "properties": {
                      "supplierRole": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "controller",
                          "processor",
                          "joint-controller",
                          "independent-controller",
                          "not-applicable"
                        ]
                      },
                      "chorusRole": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "controller",
                          "processor",
                          "joint-controller",
                          "independent-controller",
                          "not-applicable"
                        ]
                      },
                      "dpaState": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "not-reviewed",
                          "available",
                          "executed",
                          "not-offered",
                          "not-applicable"
                        ]
                      },
                      "personalDataHandled": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "acceptedIdentifierClasses": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "household-key",
                            "maid-hash",
                            "euid",
                            "postcode-sector",
                            "full-postcode",
                            "email-hash",
                            "phone-hash",
                            "raw-device-id",
                            "other",
                            "none"
                          ]
                        }
                      },
                      "rawDeviceIdentifiersRequired": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "retentionDays": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dataResidencyRegions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "blockers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "supplierRole",
                      "chorusRole",
                      "dpaState",
                      "personalDataHandled",
                      "acceptedIdentifierClasses",
                      "rawDeviceIdentifiersRequired",
                      "retentionDays",
                      "dataResidencyRegions",
                      "blockers"
                    ],
                    "additionalProperties": false
                  },
                  "support": {
                    "type": "object",
                    "properties": {
                      "accessState": {
                        "type": "string",
                        "enum": [
                          "unknown",
                          "not-established",
                          "established",
                          "unavailable"
                        ]
                      },
                      "channels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "unknown",
                            "email",
                            "ticket",
                            "phone",
                            "chat",
                            "account-manager",
                            "community"
                          ]
                        }
                      },
                      "blockers": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "accessState",
                      "channels",
                      "blockers"
                    ],
                    "additionalProperties": false
                  },
                  "evidence": {
                    "type": "object",
                    "properties": {
                      "state": {
                        "type": "string",
                        "enum": [
                          "unverified",
                          "partially-verified",
                          "verified",
                          "stale",
                          "disputed"
                        ]
                      },
                      "lastReviewedOn": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "nextReviewOn": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "official-documentation",
                                "supplier-terms",
                                "supplier-correspondence",
                                "signed-contract",
                                "credentialed-read",
                                "contract-test",
                                "test-buy",
                                "delivery-report",
                                "invoice",
                                "support-case",
                                "other"
                              ]
                            },
                            "title": {
                              "type": "string"
                            },
                            "publisher": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "observedOn": {
                              "type": "string",
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "validUntil": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "assertedFacts": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "title",
                            "publisher",
                            "observedOn",
                            "validUntil",
                            "assertedFacts"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "state",
                      "lastReviewedOn",
                      "nextReviewOn",
                      "items"
                    ],
                    "additionalProperties": false
                  },
                  "readinessBlockers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "schemaVersion",
                  "identity",
                  "commercialAccess",
                  "operations",
                  "billing",
                  "technical",
                  "creative",
                  "privacy",
                  "support",
                  "evidence",
                  "readinessBlockers"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "adapterKey",
              "status",
              "effectiveStatus",
              "revision",
              "accessClass",
              "verificationBlockers",
              "provenanceCurrent",
              "connectionBindingCurrent",
              "verifiedAt",
              "updatedAt",
              "content"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "dossier"
        ],
        "additionalProperties": false
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/connections/{key}/dossier",
        "pathFields": [
          "key"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "adapter key from list_connections"
            }
          },
          "additionalProperties": false,
          "required": [
            "key"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "set_connection",
      "title": "Configure an adapter connection",
      "description": "Switch an adapter between sandbox and live mode and optionally set its credentials. Live mode requires canonical credentials, implemented live provenance and a current human-verified supplier dossier. A campaign-specific, capped and expiring live-execution grant may also be required at launch; this tool cannot create one. An agent also cannot change a connection while an issued supplier grant exists, because the required safety revocation must be human-attributed. Sandbox needs none. Returns the updated connection.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "adapter key from list_connections"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "mode": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ],
            "description": "target mode"
          },
          "credentials": {
            "description": "vendor credentials as string key/value pairs (only needed for live mode)",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "key",
          "agentStepId",
          "expectedActionDigest",
          "mode"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "connection": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "connection"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "PATCH",
        "path": "/api/v1/connections/{key}",
        "pathFields": [
          "key"
        ],
        "pathSchema": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "adapter key from list_connections"
            }
          },
          "additionalProperties": false,
          "required": [
            "key"
          ]
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "connection.update",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "sandbox",
                "live"
              ],
              "description": "target mode"
            },
            "credentials": {
              "description": "vendor credentials as string key/value pairs (only needed for live mode)",
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "mode"
          ]
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_billing_summary",
      "title": "Get billing summary (transparent fees)",
      "description": "The advertiser’s transparent fee ledger: wallet balance, media spend, accrued platform fees, and the current fee tier. AdBuyMCP charges 10% of media spend, disclosed per line; advertisers whose trailing-30-day spend exceeds £25,000 move to the scale tier — 5% of spend plus a £749/month SaaS fee. AI asset production (produce_asset) appears as its own DISTINCT line (assetProductionMinor): hard wallet charges per asset, never blended into the media fee — the blended take % stays media-only. Use this to explain exactly what the platform costs on top of media.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {}
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {},
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/billing/summary",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_billing_statement",
      "title": "Get a monthly billing statement",
      "description": "Get the transparent JSON statement for one calendar month: media spend and per-campaign/channel platform fees, the scale-tier SaaS charge when applicable, and AI asset production as a separate hard-charge section. Amounts are integer GBP minor units. Use this for reconciliation; this tool does not return the CSV download variant.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}$",
            "description": "statement month, YYYY-MM"
          }
        },
        "required": [
          "period"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "statement": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "statement"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/billing/statements",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "period": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}$",
              "description": "statement month, YYYY-MM"
            }
          },
          "additionalProperties": false,
          "required": [
            "period"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "queryConstants": {
          "format": "json"
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "get_topup_status",
      "title": "Verify a Stripe wallet top-up",
      "description": "Check whether a live Stripe Checkout session has produced a webhook-backed wallet credit. A browser return is not payment evidence: pending means keep checking later; only credited includes trusted creditedMinor. Sandbox top-ups credit synchronously and do not need this tool.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "maxLength": 255,
            "pattern": "^cs_[A-Za-z0-9_]+$",
            "description": "Stripe Checkout session id returned by top_up_wallet"
          }
        },
        "required": [
          "sessionId"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "credited"
            ]
          },
          "creditedMinor": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "GET",
        "path": "/api/v1/billing/topup/status",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": null,
        "headers": {},
        "querySchema": {
          "type": "object",
          "properties": {
            "sessionId": {
              "type": "string",
              "maxLength": 255,
              "pattern": "^cs_[A-Za-z0-9_]+$",
              "description": "Stripe Checkout session id returned by top_up_wallet"
            }
          },
          "additionalProperties": false,
          "required": [
            "sessionId"
          ]
        },
        "queryEncoding": "URLSearchParams; omit undefined fields, stringify supplied values",
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    },
    {
      "name": "top_up_wallet",
      "title": "Top up the prepaid wallet",
      "description": "Create a prepaid-wallet top-up in GBP. Offline sandbox credits immediately; live and isolated Stripe-test modes create a Stripe Checkout session whose URL must be opened and whose eventual credit must be verified with get_topup_status. This is a consequential money operation: quote the exact amount and obtain explicit user approval immediately before calling. idempotencyKey is mandatory here; reuse it after timeouts. New live/Stripe-test funding intents require a funding-v2: prefix and unique opaque suffix. Existing keys must retain their exact value; a legacy key with no durable history or an uncertain provider outcome requires human operator reconciliation, never a replacement key or blind retry. Changed funding details fail.",
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "amountPounds": {
            "type": "number",
            "minimum": 100,
            "maximum": 21474836.47,
            "description": "top-up amount in GBP pounds; minimum £100"
          },
          "agentStepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "pending execute-step id that consumed the exact approved action"
          },
          "expectedActionDigest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 digest returned for the exact approved action"
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200,
            "description": "Retain this exact key for retries. For a genuinely new live/Stripe-test intent use funding-v2: plus a unique opaque suffix; unrecorded legacy keys require operator reconciliation."
          },
          "poNumber": {
            "description": "optional buyer purchase-order reference for reconciliation",
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "amountPounds",
          "agentStepId",
          "expectedActionDigest",
          "idempotencyKey"
        ]
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "sandbox": {
            "type": "boolean"
          },
          "checkout": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "url"
            ],
            "additionalProperties": false
          },
          "creditedMinor": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "stripeTest": {
            "type": "boolean"
          },
          "requestId": {
            "type": "string",
            "minLength": 1
          },
          "idempotentReplay": {
            "type": "boolean"
          },
          "creditConfirmed": {
            "type": "boolean"
          },
          "checkoutUrl": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "sandbox",
          "checkout"
        ],
        "additionalProperties": {}
      },
      "rest": {
        "method": "POST",
        "path": "/api/v1/billing/topup",
        "pathFields": [],
        "pathSchema": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        },
        "pathEncoding": "encodeURIComponent for each path field",
        "governedAction": "billing.topup",
        "headers": {
          "x-chorus-agent-step-id": "agentStepId",
          "x-chorus-agent-action-digest": "expectedActionDigest"
        },
        "bodySchema": {
          "type": "object",
          "properties": {
            "idempotencyKey": {
              "type": "string",
              "minLength": 8,
              "maxLength": 200,
              "description": "Retain this exact key for retries. For a genuinely new live/Stripe-test intent use funding-v2: plus a unique opaque suffix; unrecorded legacy keys require operator reconciliation."
            },
            "poNumber": {
              "description": "optional buyer purchase-order reference for reconciliation",
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "amountMinor": {
              "type": "integer",
              "minimum": 10000,
              "maximum": 2147483647
            }
          },
          "additionalProperties": false,
          "required": [
            "idempotencyKey",
            "amountMinor"
          ]
        },
        "bodyMapping": {
          "passthroughOtherFields": true,
          "amountMinor": {
            "from": "amountPounds",
            "transform": "Math.round(value * 100)"
          },
          "constants": {}
        },
        "responseMapping": "REST JSON is returned as MCP structuredContent and a compatibility text block; privacy-sensitive tools validate their output schema."
      }
    }
  ]
}
