{
  "openapi": "3.1.0",
  "info": {
    "title": "Altss Console agent API",
    "version": "1.0.0",
    "summary": "Prepaid public-source company research for customer agents.",
    "description": "REST interface for the Altss Console. Eight tools are offered: company.financial_research (SEC Financial Research Brief, $25 per accepted execution); company.lei_lookup (Legal Entity Identifier lookup, $0.05 per accepted execution); company.profile (Company filing profile, $0.10 per accepted execution); contact.email_verified (Verified business email, $0.05 per accepted execution); contact.email_verify (Email verification, $0.03 per accepted execution); filing.index (SEC filing index, $0.05 per accepted execution); procurement.canada (Canadian federal tenders, $0.05 per accepted execution); procurement.ocds (Open Contracting releases, $0.05 per accepted execution). Every offered capability is also described, with input and output JSON Schemas, limits and scopes, by the public GET /capabilities. Other capability ids that the catalog lists as COMING_ONLINE cannot be quoted, run or charged. The first funding minimum is $1,000 USD. The repeat funding minimum for this release is $1,000 USD. The funding page shows the current minimum. Before its first paid run an organization must accept the Console data licence: an owner or admin accepts it in the Console at https://console.altss.com/console/playground/new. Until then a paid run answers 403 TOOL_UNAVAILABLE with error.details.reason `licence_acceptance_required` and error.details.nextStepUrl. Nothing is charged, and quotes are not affected.\n\nFlow: create a key in the Console (it needs the company.read scope and the API channel), call GET /capabilities (public) or GET /tools, POST /quote (reads no data and charges nothing), show the price, maximum charge, plan and use terms to the customer, then POST /runs with the unchanged quote, accept true and one idempotency key per purchase. GET /runs/{runId} re-opens a settled result and receipt without charging again. Authentication alone never authorizes payment. Public metadata does not grant access.\n\nErrors: read error.code from the JSON body and the HTTP status. The envelope around error varies by layer, so do not depend on other fields. See https://console.altss.com/connect#errors for what each code means and what an agent should do. The MCP endpoint is described here only as a path; its tools are altss_list_capabilities, altss_quote, altss_run and altss_get_run."
  },
  "servers": [
    {
      "url": "https://console.altss.com/v1/console",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Catalog",
      "description": "What is offered to your organization."
    },
    {
      "name": "Purchase",
      "description": "Quote, authorize, run."
    },
    {
      "name": "Retrieve",
      "description": "Re-open a purchased result and receipt."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol over stateless Streamable HTTP."
    }
  ],
  "paths": {
    "/capabilities": {
      "get": {
        "operationId": "listCapabilities",
        "tags": [
          "Catalog"
        ],
        "summary": "List every capability with status, schemas, price and limits",
        "description": "Public: needs no credential, charges nothing and runs nothing. AVAILABLE capabilities first; COMING_ONLINE ones are marked and can never be quoted or run. Cacheable: send If-None-Match with the ETag to receive 304.",
        "security": [],
        "responses": {
          "200": {
            "description": "The capability descriptors. Cache-Control: public, max-age=60.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemaVersion",
                    "capabilities",
                    "marketplaceUrl"
                  ],
                  "properties": {
                    "schemaVersion": {
                      "type": "integer"
                    },
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CapabilityDescriptor"
                      }
                    },
                    "marketplaceUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "Read-only link to the full public marketplace. Console reports executable capabilities separately.",
                      "const": "https://altss.com/console/capabilities"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified."
          }
        }
      }
    },
    "/capabilities/{id}": {
      "get": {
        "operationId": "getCapability",
        "tags": [
          "Catalog"
        ],
        "summary": "Read one capability descriptor",
        "description": "Public, cacheable, free. An unknown id is 404.",
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "examples": [
                "company.financial_research"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The descriptor. Cache-Control: public, max-age=60.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "schemaVersion",
                    "capability",
                    "marketplaceUrl"
                  ],
                  "properties": {
                    "schemaVersion": {
                      "type": "integer"
                    },
                    "capability": {
                      "$ref": "#/components/schemas/CapabilityDescriptor"
                    },
                    "marketplaceUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "Read-only link to the full public marketplace. Console reports executable capabilities separately.",
                      "const": "https://altss.com/console/capabilities"
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Not modified."
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/tools": {
      "get": {
        "operationId": "listTools",
        "tags": [
          "Catalog"
        ],
        "summary": "List the tools available to the credential's organization",
        "description": "Starts no paid execution and needs no funding. Rows whose availability is not AVAILABLE cannot be quoted or run.",
        "responses": {
          "200": {
            "description": "The catalog. Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tools"
                  ],
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ToolRow"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/quote": {
      "post": {
        "operationId": "createQuote",
        "tags": [
          "Purchase"
        ],
        "summary": "Price one execution",
        "description": "Reads no company data, charges nothing, needs no funding and stores nothing. The quote is a stateless consent token bound to your organization, this credential, the tool and version, the input, the price book and the use terms. It expires 900 seconds after issuedAt. Show the price, maximum charge, plan and complete useTerms to the customer before running.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The quote. Cache-Control: no-store. Send it back byte-for-byte unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/runs": {
      "post": {
        "operationId": "createRun",
        "tags": [
          "Purchase"
        ],
        "summary": "Purchase one result with an accepted quote",
        "description": "Synchronous: the call returns after the run settles or releases (tool timeouts: company.financial_research 25 seconds, company.lei_lookup 20 seconds, company.profile 10 seconds, contact.email_verified 120 seconds, contact.email_verify 120 seconds, filing.index 12 seconds, procurement.canada 25 seconds, procurement.ocds 20 seconds). Requires an ACTIVE wallet with confirmed funding and a credential whose per-request and daily limits allow the quoted maximum. A failure after funds are reserved releases the reservation in full (final charge 0). Send one idempotency key per purchase, in the Idempotency-Key header or the idempotencyKey body field (if both are sent they must match), and reuse it on every retry; never invent a new key to retry an uncertain purchase. A timeout is not proof that no charge occurred: check the existing run first.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Alternative to the idempotencyKey body field.",
            "schema": {
              "$ref": "#/components/schemas/IdempotencyKey"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The settled run. Cache-Control: no-store. replayed is true when the same idempotency key returned an already settled run.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          },
          "504": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/runs/{runId}": {
      "get": {
        "operationId": "getRun",
        "tags": [
          "Retrieve"
        ],
        "summary": "Read a run, its result and its receipt",
        "description": "Scoped to the credential's organization. Needs no funding and never charges. The result (response) is present only when the run is SETTLED and may be disclosed; unpaid results stay private.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The run. Cache-Control: no-store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpRpc",
        "tags": [
          "MCP"
        ],
        "summary": "MCP over stateless Streamable HTTP (JSON-RPC 2.0)",
        "description": "Use a credential issued for the MCP channel (an API-only key gets 401). One JSON-RPC request per POST, no sessions, no server-sent events, batches refused. Methods: initialize, ping, tools/list and tools/call with altss_list_capabilities, altss_quote, altss_run and altss_get_run; notifications/initialized and notifications/cancelled return 202. Send Accept: application/json, text/event-stream and, after initialize, MCP-Protocol-Version: 2025-06-18. A failed tool call is HTTP 200 with result.isError true; inspect both the HTTP status and isError. Each POST counts against the credential's per-minute limit.",
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "const": "2025-06-18"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "const": "2.0"
                  },
                  "id": {
                    "oneOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  },
                  "method": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "params": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted. Empty body."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "406": {
            "description": "Accept must include both application/json and text/event-stream."
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An agent credential created in the Console (shown once). REST needs the API channel, MCP needs the MCP channel, and both need the company.read scope. Send it only to https://console.altss.com in the Authorization header; keep it out of chat, shared configuration and URLs."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing, malformed, unknown, revoked or wrong-channel credential. All causes are deliberately identical. Sends WWW-Authenticate: Bearer.",
        "headers": {
          "WWW-Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error": {
        "description": "A refused or failed request. Read error.code and the HTTP status; see https://console.altss.com/connect#errors. error.chargeState (when present) says whether money moved: none, held, released or unknown.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "CapabilityDescriptor": {
        "type": "object",
        "required": [
          "id",
          "aliases",
          "version",
          "title",
          "description",
          "family",
          "status",
          "inputSchema",
          "outputSchema",
          "pricing",
          "limits",
          "scopes",
          "protocols",
          "idempotency",
          "provenance"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "The one canonical id. Every quote, run, receipt and A2A task carries it."
          },
          "workspacePath": {
            "type": "string",
            "description": "Relative Console workspace path for this capability when its customer purchase form is available.",
            "pattern": "^/console/playground/new[?]capability=[a-z][a-z0-9_]*[.][a-z][a-z0-9_]*$"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Other names accepted on REST, MCP and A2A for this capability (resolved to id before any work). Empty unless the capability is AVAILABLE."
          },
          "version": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "family": {
            "type": "string",
            "enum": [
              "financial",
              "company",
              "search",
              "web",
              "people",
              "entity",
              "research",
              "monitoring",
              "agents"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "COMING_ONLINE"
            ],
            "description": "Only AVAILABLE capabilities can be quoted or run."
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON Schema 2020-12 of the quote and run input."
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "JSON Schema 2020-12 of the delivered result."
          },
          "pricing": {
            "type": [
              "object",
              "null"
            ],
            "description": "Fixed price per accepted execution; null while COMING_ONLINE.",
            "required": [
              "model",
              "amountMinor",
              "currency",
              "priceVersion",
              "unit"
            ],
            "properties": {
              "model": {
                "const": "FIXED_PER_ACCEPTED_EXECUTION"
              },
              "amountMinor": {
                "type": "integer"
              },
              "currency": {
                "const": "USD"
              },
              "priceVersion": {
                "type": "string"
              },
              "unit": {
                "const": "accepted_execution"
              }
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "timeoutMs": {
                "type": "integer"
              },
              "maxResultBytes": {
                "type": "integer"
              },
              "maxEvidenceItems": {
                "type": "integer"
              },
              "perKeyPerMinute": {
                "type": "integer"
              },
              "perKeyPerDay": {
                "type": "integer"
              }
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "protocols": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "rest",
                "mcp",
                "a2a"
              ]
            }
          },
          "idempotency": {
            "type": "object",
            "properties": {
              "required": {
                "const": true
              },
              "header": {
                "const": "Idempotency-Key"
              }
            }
          },
          "provenance": {
            "type": "object",
            "properties": {
              "sourceCategory": {
                "type": "string"
              }
            }
          }
        }
      },
      "Cik": {
        "type": "string",
        "pattern": "^[0-9]{10}$",
        "not": {
          "const": "0000000000"
        },
        "description": "An exact ten-digit SEC CIK, zero padded.",
        "examples": [
          "0000789019"
        ]
      },
      "IdempotencyKey": {
        "type": "string",
        "minLength": 1,
        "maxLength": 180,
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
        "description": "Unique per purchase and per credential. Must not start with console-task:."
      },
      "ToolRow": {
        "type": "object",
        "required": [
          "id",
          "availability"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "company.financial_research"
            ]
          },
          "version": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "availability": {
            "type": "string",
            "enum": [
              "AVAILABLE",
              "COMING_ONLINE",
              "ENTERPRISE"
            ],
            "description": "Only AVAILABLE rows can be quoted or run."
          },
          "requiredScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priceSummary": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "properties": {
              "strategy": {
                "type": "string"
              },
              "baseMinor": {
                "type": "integer"
              },
              "maxReservationMinor": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              }
            }
          },
          "inputSummary": {
            "type": "string"
          },
          "outputSummary": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "includes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "excludes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "exampleInput": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "required": [
          "toolId",
          "input"
        ],
        "additionalProperties": false,
        "properties": {
          "toolId": {
            "type": "string",
            "enum": [
              "company.financial_research",
              "company.lei_lookup",
              "company.profile",
              "contact.email_verified",
              "contact.email_verify",
              "filing.index",
              "procurement.canada",
              "procurement.ocds",
              "contact.work_email",
              "filing.raw",
              "sec.filing.index"
            ]
          },
          "input": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              },
              {
                "type": "object",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lei": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9]{18}[0-9]{2}$"
                      }
                    },
                    "required": [
                      "lei"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "legalName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "legalName"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "companyDomain"
                ],
                "anyOf": [
                  {
                    "required": [
                      "firstName",
                      "lastName"
                    ]
                  },
                  {
                    "required": [
                      "linkedinUrl"
                    ]
                  }
                ],
                "properties": {
                  "companyDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "linkedinUrl": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "companyName": {
                    "type": "string",
                    "maxLength": 160
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  },
                  "forms": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250,
                    "description": "Comma-separated exact SEC form types, at most 10 (for example 10-K,8-K). An amendment such as 10-K/A is a separate form type."
                  },
                  "filedFrom": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive earliest filing date, YYYY-MM-DD."
                  },
                  "filedTo": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive latest filing date, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Most filings returned, newest first. Default and maximum 100."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "unspsc": {
                    "type": "string",
                    "pattern": "^\\d{2,8}$"
                  },
                  "publishedSince": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "publisher": {
                    "default": "uk_contracts_finder",
                    "type": "string",
                    "enum": [
                      "uk_contracts_finder"
                    ]
                  },
                  "stage": {
                    "default": "tender",
                    "type": "string",
                    "enum": [
                      "planning",
                      "tender",
                      "award"
                    ]
                  },
                  "publishedFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "publishedTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "keyword": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "supplier": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "required": [
                  "publishedFrom",
                  "publishedTo"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "oneOf": [
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.financial_research"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.lei_lookup"
                ]
              },
              "input": {
                "type": "object",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lei": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9]{18}[0-9]{2}$"
                      }
                    },
                    "required": [
                      "lei"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "legalName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "legalName"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.profile"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "contact.email_verified",
                  "contact.work_email"
                ]
              },
              "input": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "companyDomain"
                ],
                "anyOf": [
                  {
                    "required": [
                      "firstName",
                      "lastName"
                    ]
                  },
                  {
                    "required": [
                      "linkedinUrl"
                    ]
                  }
                ],
                "properties": {
                  "companyDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "linkedinUrl": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "companyName": {
                    "type": "string",
                    "maxLength": 160
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "contact.email_verify"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "filing.index",
                  "filing.raw",
                  "sec.filing.index"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  },
                  "forms": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250,
                    "description": "Comma-separated exact SEC form types, at most 10 (for example 10-K,8-K). An amendment such as 10-K/A is a separate form type."
                  },
                  "filedFrom": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive earliest filing date, YYYY-MM-DD."
                  },
                  "filedTo": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive latest filing date, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Most filings returned, newest first. Default and maximum 100."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "procurement.canada"
                ]
              },
              "input": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "unspsc": {
                    "type": "string",
                    "pattern": "^\\d{2,8}$"
                  },
                  "publishedSince": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "procurement.ocds"
                ]
              },
              "input": {
                "type": "object",
                "properties": {
                  "publisher": {
                    "default": "uk_contracts_finder",
                    "type": "string",
                    "enum": [
                      "uk_contracts_finder"
                    ]
                  },
                  "stage": {
                    "default": "tender",
                    "type": "string",
                    "enum": [
                      "planning",
                      "tender",
                      "award"
                    ]
                  },
                  "publishedFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "publishedTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "keyword": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "supplier": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "required": [
                  "publishedFrom",
                  "publishedTo"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          }
        ]
      },
      "Quote": {
        "type": "object",
        "additionalProperties": true,
        "description": "Opaque to the agent: send it back unchanged. Fields shown are the ones to display to the customer before accepting.",
        "required": [
          "quoteId",
          "toolId",
          "currency",
          "priceMinor",
          "maxReserveMinor",
          "expiresAt",
          "useTerms",
          "plan"
        ],
        "properties": {
          "quoteId": {
            "type": "string",
            "pattern": "^q_[0-9a-f]{40}$"
          },
          "toolId": {
            "type": "string"
          },
          "toolVersion": {
            "type": "integer"
          },
          "currency": {
            "type": "string",
            "examples": [
              "usd"
            ]
          },
          "priceMinor": {
            "type": "integer",
            "description": "Price in minor units (cents).",
            "examples": [
              2500
            ]
          },
          "maxReserveMinor": {
            "type": "integer",
            "description": "The maximum charge.",
            "examples": [
              2500
            ]
          },
          "priceBookVersion": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "900 seconds after issuedAt."
          },
          "useTerms": {
            "type": "object",
            "additionalProperties": true,
            "description": "Permitted uses, storage, caching, retention, attribution, training restrictions and the incorporated agreements. Show it to the customer."
          },
          "plan": {
            "type": "object",
            "additionalProperties": true,
            "description": "The bounded plan: one tool call with a timeout of up to 120 seconds."
          }
        }
      },
      "RunRequest": {
        "type": "object",
        "required": [
          "toolId",
          "input",
          "quote",
          "accept"
        ],
        "additionalProperties": false,
        "properties": {
          "toolId": {
            "type": "string",
            "enum": [
              "company.financial_research",
              "company.lei_lookup",
              "company.profile",
              "contact.email_verified",
              "contact.email_verify",
              "filing.index",
              "procurement.canada",
              "procurement.ocds",
              "contact.work_email",
              "filing.raw",
              "sec.filing.index"
            ]
          },
          "input": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              },
              {
                "type": "object",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lei": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9]{18}[0-9]{2}$"
                      }
                    },
                    "required": [
                      "lei"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "legalName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "legalName"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "companyDomain"
                ],
                "anyOf": [
                  {
                    "required": [
                      "firstName",
                      "lastName"
                    ]
                  },
                  {
                    "required": [
                      "linkedinUrl"
                    ]
                  }
                ],
                "properties": {
                  "companyDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "linkedinUrl": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "companyName": {
                    "type": "string",
                    "maxLength": 160
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                }
              },
              {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  },
                  "forms": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250,
                    "description": "Comma-separated exact SEC form types, at most 10 (for example 10-K,8-K). An amendment such as 10-K/A is a separate form type."
                  },
                  "filedFrom": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive earliest filing date, YYYY-MM-DD."
                  },
                  "filedTo": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive latest filing date, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Most filings returned, newest first. Default and maximum 100."
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "unspsc": {
                    "type": "string",
                    "pattern": "^\\d{2,8}$"
                  },
                  "publishedSince": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "publisher": {
                    "default": "uk_contracts_finder",
                    "type": "string",
                    "enum": [
                      "uk_contracts_finder"
                    ]
                  },
                  "stage": {
                    "default": "tender",
                    "type": "string",
                    "enum": [
                      "planning",
                      "tender",
                      "award"
                    ]
                  },
                  "publishedFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "publishedTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "keyword": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "supplier": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "required": [
                  "publishedFrom",
                  "publishedTo"
                ],
                "additionalProperties": false
              }
            ]
          },
          "quote": {
            "$ref": "#/components/schemas/Quote"
          },
          "accept": {
            "type": "boolean",
            "const": true,
            "description": "Only after the customer authorized this exact quote."
          },
          "idempotencyKey": {
            "$ref": "#/components/schemas/IdempotencyKey"
          }
        },
        "oneOf": [
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.financial_research"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.lei_lookup"
                ]
              },
              "input": {
                "type": "object",
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "lei": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9]{18}[0-9]{2}$"
                      }
                    },
                    "required": [
                      "lei"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "legalName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "legalName"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "company.profile"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "contact.email_verified",
                  "contact.work_email"
                ]
              },
              "input": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "companyDomain"
                ],
                "anyOf": [
                  {
                    "required": [
                      "firstName",
                      "lastName"
                    ]
                  },
                  {
                    "required": [
                      "linkedinUrl"
                    ]
                  }
                ],
                "properties": {
                  "companyDomain": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  },
                  "firstName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "lastName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "linkedinUrl": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "companyName": {
                    "type": "string",
                    "maxLength": 160
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "contact.email_verify"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "filing.index",
                  "filing.raw",
                  "sec.filing.index"
                ]
              },
              "input": {
                "type": "object",
                "required": [
                  "cik"
                ],
                "additionalProperties": false,
                "properties": {
                  "cik": {
                    "type": "string",
                    "pattern": "^[0-9]{10}$",
                    "description": "Exact ten-digit nonzero SEC CIK."
                  },
                  "forms": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 250,
                    "description": "Comma-separated exact SEC form types, at most 10 (for example 10-K,8-K). An amendment such as 10-K/A is a separate form type."
                  },
                  "filedFrom": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive earliest filing date, YYYY-MM-DD."
                  },
                  "filedTo": {
                    "type": "string",
                    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                    "description": "Inclusive latest filing date, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "description": "Most filings returned, newest first. Default and maximum 100."
                  }
                }
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "procurement.canada"
                ]
              },
              "input": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "unspsc": {
                    "type": "string",
                    "pattern": "^\\d{2,8}$"
                  },
                  "publishedSince": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          },
          {
            "properties": {
              "toolId": {
                "enum": [
                  "procurement.ocds"
                ]
              },
              "input": {
                "type": "object",
                "properties": {
                  "publisher": {
                    "default": "uk_contracts_finder",
                    "type": "string",
                    "enum": [
                      "uk_contracts_finder"
                    ]
                  },
                  "stage": {
                    "default": "tender",
                    "type": "string",
                    "enum": [
                      "planning",
                      "tender",
                      "award"
                    ]
                  },
                  "publishedFrom": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "publishedTo": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "keyword": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "buyer": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "supplier": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
                  },
                  "limit": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 25
                  }
                },
                "required": [
                  "publishedFrom",
                  "publishedTo"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "toolId",
              "input"
            ]
          }
        ]
      },
      "RunResult": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "runId",
          "receiptId",
          "tool",
          "result",
          "usage",
          "receipt"
        ],
        "properties": {
          "requestId": {
            "type": "string"
          },
          "runId": {
            "type": "string",
            "format": "uuid"
          },
          "receiptId": {
            "type": "string",
            "format": "uuid"
          },
          "tool": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "version": {
                "type": "integer"
              }
            }
          },
          "result": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Result_company_financial_research"
              },
              {
                "$ref": "#/components/schemas/Result_company_lei_lookup"
              },
              {
                "$ref": "#/components/schemas/Result_company_profile"
              },
              {
                "$ref": "#/components/schemas/Result_contact_email_verified"
              },
              {
                "$ref": "#/components/schemas/Result_contact_email_verify"
              },
              {
                "$ref": "#/components/schemas/Result_filing_index"
              },
              {
                "$ref": "#/components/schemas/Result_procurement_canada"
              },
              {
                "$ref": "#/components/schemas/Result_procurement_ocds"
              }
            ],
            "description": "The delivered result. Its shape is the outputSchema of the quoted capability."
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "freshness": {
            "type": "object",
            "additionalProperties": true
          },
          "usage": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "currency": {
                "type": "string"
              },
              "quotedMinor": {
                "type": "integer"
              },
              "reservedMinor": {
                "type": "integer"
              },
              "settledMinor": {
                "type": "integer"
              },
              "releasedMinor": {
                "type": "integer"
              },
              "balanceAfterMinor": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "receipt": {
            "type": "object",
            "additionalProperties": true,
            "description": "The sealed settlement receipt."
          },
          "useTerms": {
            "type": "object",
            "additionalProperties": true
          },
          "plan": {
            "type": "object",
            "additionalProperties": true
          },
          "execution": {
            "type": "object",
            "additionalProperties": true
          },
          "artifact": {
            "type": "object",
            "additionalProperties": true
          },
          "replayed": {
            "type": "boolean"
          }
        }
      },
      "RunDetail": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "id",
          "toolId",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "toolId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "OPEN",
              "RESERVED",
              "SETTLED",
              "RELEASED",
              "ABANDONED"
            ]
          },
          "reservedMinor": {
            "type": "integer"
          },
          "settledMinor": {
            "type": "integer"
          },
          "releasedMinor": {
            "type": "integer"
          },
          "resultStatus": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SUCCEEDED",
              "FAILED",
              null
            ]
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "response": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RunResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "The full result, only when the run is SETTLED and may be disclosed."
          },
          "receipt": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "ledgerTrace": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": true,
        "description": "Read error.code (when error is an object) and the HTTP status. REST errors may carry statusCode, message, timestamp and path around error; some edge refusals are a flat {\"error\":\"<code>\"}.",
        "properties": {
          "error": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": true,
                "properties": {
                  "code": {
                    "type": "string",
                    "examples": [
                      "FUNDING_REQUIRED"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "chargeState": {
                    "type": "string",
                    "description": "For example none, held, released or unknown."
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              },
              {
                "type": "string"
              }
            ]
          },
          "statusCode": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "timestamp": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        }
      },
      "CapabilityInput": {
        "type": "object",
        "required": [
          "cik"
        ],
        "additionalProperties": false,
        "properties": {
          "cik": {
            "type": "string",
            "pattern": "^[0-9]{10}$",
            "description": "Exact ten-digit nonzero SEC CIK."
          }
        }
      },
      "Result_company_financial_research": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "SEC_FINANCIAL_RESEARCH"
          },
          "issuer": {
            "type": "object",
            "properties": {
              "cik": {
                "type": "string",
                "pattern": "^\\d{10}$"
              },
              "reportedName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "sic": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "industry": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "fiscalYearEnd": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "cik",
              "reportedName",
              "sic",
              "industry",
              "fiscalYearEnd"
            ],
            "additionalProperties": false
          },
          "financialEntityName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "laterFiledFactsExcluded": {
            "type": "boolean"
          },
          "periods": {
            "minItems": 2,
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "end": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "filed": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "accession": {
                  "type": "string",
                  "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                },
                "filingUrl": {
                  "type": "string",
                  "format": "uri"
                },
                "facts": {
                  "minItems": 4,
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "metric": {
                        "type": "string",
                        "enum": [
                          "revenue",
                          "netIncome",
                          "assets",
                          "operatingCashFlow",
                          "operatingIncome",
                          "grossProfit",
                          "liabilities",
                          "stockholdersEquity",
                          "cash",
                          "capitalExpenditure"
                        ]
                      },
                      "concept": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 1000
                      },
                      "taxonomy": {
                        "type": "string",
                        "const": "us-gaap"
                      },
                      "unit": {
                        "type": "string",
                        "const": "USD"
                      },
                      "value": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "start": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "end": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "filed": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "accession": {
                        "type": "string",
                        "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                      },
                      "form": {
                        "type": "string",
                        "enum": [
                          "10-K",
                          "10-K/A"
                        ]
                      }
                    },
                    "required": [
                      "metric",
                      "concept",
                      "taxonomy",
                      "unit",
                      "value",
                      "start",
                      "end",
                      "filed",
                      "accession",
                      "form"
                    ],
                    "additionalProperties": false
                  }
                },
                "derived": {
                  "type": "object",
                  "properties": {
                    "netMarginPercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "operatingCashFlowMarginPercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "liabilitiesToAssetsPercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "operatingCashFlowLessPpePurchasesUsd": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "netMarginPercent",
                    "operatingCashFlowMarginPercent",
                    "liabilitiesToAssetsPercent",
                    "operatingCashFlowLessPpePurchasesUsd"
                  ],
                  "additionalProperties": false
                },
                "missingMetrics": {
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "revenue",
                      "netIncome",
                      "assets",
                      "operatingCashFlow",
                      "operatingIncome",
                      "grossProfit",
                      "liabilities",
                      "stockholdersEquity",
                      "cash",
                      "capitalExpenditure"
                    ]
                  }
                }
              },
              "required": [
                "start",
                "end",
                "filed",
                "accession",
                "filingUrl",
                "facts",
                "derived",
                "missingMetrics"
              ],
              "additionalProperties": false
            }
          },
          "comparisons": {
            "type": "object",
            "properties": {
              "priorPeriodEnd": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "currentPeriodEnd": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "revenueChangeUsd": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "revenueGrowthPercent": {
                "type": "number"
              },
              "netIncomeChangeUsd": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "operatingCashFlowChangeUsd": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "priorPeriodEnd",
              "currentPeriodEnd",
              "revenueChangeUsd",
              "revenueGrowthPercent",
              "netIncomeChangeUsd",
              "operatingCashFlowChangeUsd"
            ],
            "additionalProperties": false
          },
          "methodology": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "const": "USD"
              },
              "taxonomy": {
                "type": "string",
                "const": "us-gaap"
              },
              "annualForms": {
                "minItems": 2,
                "maxItems": 2,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "10-K",
                    "10-K/A"
                  ]
                }
              },
              "cohortSelection": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "revenueConcept": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "periodLabels": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "cashFlowMeasure": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              }
            },
            "required": [
              "currency",
              "taxonomy",
              "annualForms",
              "cohortSelection",
              "revenueConcept",
              "periodLabels",
              "cashFlowMeasure"
            ],
            "additionalProperties": false
          },
          "limitations": {
            "minItems": 4,
            "maxItems": 4,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "source": {
            "type": "object",
            "properties": {
              "submissions": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "fetchedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "responseSha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "url",
                  "fetchedAt",
                  "responseSha256"
                ],
                "additionalProperties": false
              },
              "companyfacts": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "fetchedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                  },
                  "responseSha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "url",
                  "fetchedAt",
                  "responseSha256"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "submissions",
              "companyfacts"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schemaVersion",
          "kind",
          "issuer",
          "financialEntityName",
          "laterFiledFactsExcluded",
          "periods",
          "comparisons",
          "methodology",
          "limitations",
          "source"
        ],
        "additionalProperties": false,
        "description": "Result of company.financial_research."
      },
      "Result_company_lei_lookup": {
        "type": "object",
        "properties": {
          "record": {
            "type": "object",
            "properties": {
              "lei": {
                "type": "string"
              },
              "legalName": {
                "type": "string",
                "minLength": 2,
                "maxLength": 500,
                "pattern": "^[^\\u0000-\\u001f\\u007f<>]+$"
              },
              "jurisdiction": {
                "type": "string",
                "pattern": "^[A-Z]{2}(?:-[A-Z0-9]{1,3})?$"
              },
              "entityStatus": {
                "type": "string",
                "pattern": "^[A-Z_]{1,50}$"
              },
              "registrationStatus": {
                "type": "string",
                "pattern": "^[A-Z_]{1,50}$"
              },
              "registeredAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[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)))$"
              }
            },
            "required": [
              "lei",
              "legalName",
              "jurisdiction",
              "entityStatus",
              "registrationStatus",
              "registeredAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "responseSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "record",
          "fetchedAt",
          "responseSha256"
        ],
        "additionalProperties": false,
        "description": "Result of company.lei_lookup."
      },
      "Result_company_profile": {
        "type": "object",
        "required": [
          "schemaVersion",
          "kind",
          "coverage",
          "issuer",
          "source",
          "unknowns"
        ],
        "additionalProperties": false,
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "kind": {
            "const": "PUBLIC_FILING_PROFILE"
          },
          "coverage": {
            "const": "SEC_OPERATING_ISSUER_METADATA"
          },
          "issuer": {
            "type": "object",
            "required": [
              "cik",
              "reportedName",
              "sic",
              "industry",
              "fiscalYearEnd"
            ],
            "additionalProperties": false,
            "properties": {
              "cik": {
                "type": "string",
                "pattern": "^[0-9]{10}$"
              },
              "reportedName": {
                "type": "string"
              },
              "sic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "industry": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fiscalYearEnd": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "source": {
            "type": "object",
            "required": [
              "url",
              "fetchedAt",
              "responseSha256"
            ],
            "additionalProperties": false,
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "fetchedAt": {
                "type": "string",
                "format": "date-time"
              },
              "responseSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            }
          },
          "unknowns": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "reason"
              ],
              "additionalProperties": false,
              "properties": {
                "field": {
                  "type": "string"
                },
                "reason": {
                  "enum": [
                    "not_recorded",
                    "invalid_source_value"
                  ]
                }
              }
            }
          }
        },
        "description": "Result of company.profile."
      },
      "Result_contact_email_verified": {
        "type": "object",
        "properties": {
          "requestHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "email": {
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "status": {
            "type": "string",
            "const": "valid"
          },
          "verifiedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "requestHash",
          "email",
          "status",
          "verifiedAt"
        ],
        "additionalProperties": false,
        "description": "Result of contact.email_verified."
      },
      "Result_contact_email_verify": {
        "type": "object",
        "properties": {
          "requestHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "valid",
              "invalid",
              "catch_all",
              "role_account"
            ]
          },
          "deliverable": {
            "type": "boolean"
          },
          "freeProvider": {
            "type": "boolean"
          },
          "verifiedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "requestHash",
          "status",
          "deliverable",
          "freeProvider",
          "verifiedAt"
        ],
        "additionalProperties": false,
        "description": "Result of contact.email_verify."
      },
      "Result_filing_index": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "number",
            "const": 1
          },
          "kind": {
            "type": "string",
            "const": "PUBLIC_FILING_INDEX"
          },
          "coverage": {
            "type": "string",
            "const": "SEC_SUBMISSIONS_RECENT_FILINGS"
          },
          "issuer": {
            "type": "object",
            "properties": {
              "cik": {
                "type": "string",
                "pattern": "^\\d{10}$"
              },
              "reportedName": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "required": [
              "cik",
              "reportedName"
            ],
            "additionalProperties": false
          },
          "request": {
            "type": "object",
            "properties": {
              "forms": {
                "anyOf": [
                  {
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "filedFrom": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "filedTo": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              }
            },
            "required": [
              "forms",
              "filedFrom",
              "filedTo",
              "limit"
            ],
            "additionalProperties": false
          },
          "filings": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accessionNumber": {
                  "type": "string",
                  "pattern": "^\\d{10}-\\d{2}-\\d{6}$"
                },
                "form": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9 /-]{0,39}$"
                },
                "filingDate": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "reportDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sizeBytes": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "primaryDocument": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "primaryDocumentUrl": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 400
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "filingIndexUrl": {
                  "type": "string",
                  "maxLength": 400
                }
              },
              "required": [
                "accessionNumber",
                "form",
                "filingDate",
                "reportDate",
                "sizeBytes",
                "primaryDocument",
                "primaryDocumentUrl",
                "filingIndexUrl"
              ],
              "additionalProperties": false
            }
          },
          "summary": {
            "type": "object",
            "properties": {
              "matched": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "returned": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "truncated": {
                "type": "boolean"
              },
              "recentRowsRead": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "newestRecentFilingDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "oldestRecentFilingDate": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "olderArchivePages": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "complete": {
                "type": "boolean"
              }
            },
            "required": [
              "matched",
              "returned",
              "truncated",
              "recentRowsRead",
              "newestRecentFilingDate",
              "oldestRecentFilingDate",
              "olderArchivePages",
              "complete"
            ],
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "fetchedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "responseSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "url",
              "fetchedAt",
              "responseSha256"
            ],
            "additionalProperties": false
          },
          "unknowns": {
            "maxItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "const": "filings"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "older_filing_pages_not_read",
                    "invalid_source_value"
                  ]
                }
              },
              "required": [
                "field",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schemaVersion",
          "kind",
          "coverage",
          "issuer",
          "request",
          "filings",
          "summary",
          "source",
          "unknowns"
        ],
        "additionalProperties": false,
        "description": "Result of filing.index."
      },
      "Result_procurement_canada": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "CANADA_OPEN_TENDERS"
          },
          "request": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120,
                "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
              },
              "buyer": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120,
                "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
              },
              "unspsc": {
                "type": "string",
                "pattern": "^\\d{2,8}$"
              },
              "publishedSince": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "limit": {
                "default": 10,
                "type": "integer",
                "minimum": 1,
                "maximum": 25
              }
            },
            "required": [
              "limit"
            ],
            "additionalProperties": false
          },
          "notices": {
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "referenceNumber": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "buyer": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "publicationDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closingDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:[T ][0-9:.+-]+Z?)?$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 400,
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "referenceNumber",
                "title",
                "buyer",
                "publicationDate",
                "closingDate",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "totalMatches": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "source": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "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))$"
              },
              "responseSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "attribution": {
                "type": "string"
              },
              "licenceUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "url",
              "retrievedAt",
              "responseSha256",
              "attribution",
              "licenceUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "kind",
          "request",
          "notices",
          "totalMatches",
          "source"
        ],
        "additionalProperties": false,
        "description": "Result of procurement.canada."
      },
      "Result_procurement_ocds": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "OCDS_RELEASES"
          },
          "request": {
            "type": "object",
            "properties": {
              "publisher": {
                "default": "uk_contracts_finder",
                "type": "string",
                "enum": [
                  "uk_contracts_finder"
                ]
              },
              "stage": {
                "default": "tender",
                "type": "string",
                "enum": [
                  "planning",
                  "tender",
                  "award"
                ]
              },
              "publishedFrom": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "publishedTo": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              "keyword": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120,
                "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
              },
              "buyer": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120,
                "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
              },
              "supplier": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120,
                "pattern": "^[\\p{L}\\p{N} .,&'()/+-]+$"
              },
              "limit": {
                "default": 10,
                "type": "integer",
                "minimum": 1,
                "maximum": 25
              }
            },
            "required": [
              "publisher",
              "stage",
              "publishedFrom",
              "publishedTo",
              "limit"
            ],
            "additionalProperties": false
          },
          "releases": {
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ocid": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "releaseId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "buyer": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "releaseDate": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}(?:[T ][0-9:.+-]+Z?)?$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stage": {
                  "maxItems": 6,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  }
                },
                "suppliers": {
                  "maxItems": 15,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                }
              },
              "required": [
                "ocid",
                "releaseId",
                "title",
                "buyer",
                "releaseDate",
                "stage",
                "suppliers"
              ],
              "additionalProperties": false
            }
          },
          "scanned": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 100
          },
          "windowFullyScanned": {
            "type": "boolean"
          },
          "source": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "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))$"
              },
              "responseSha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "attribution": {
                "type": "string"
              },
              "licenceUrl": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "url",
              "retrievedAt",
              "responseSha256",
              "attribution",
              "licenceUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "kind",
          "request",
          "releases",
          "scanned",
          "windowFullyScanned",
          "source"
        ],
        "additionalProperties": false,
        "description": "Result of procurement.ocds."
      }
    }
  }
}
