{
  "openapi": "3.0.1",
  "info": {
    "title": "Sales API",
    "description": "Sales management API",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://sales.api.snokam.no"
    }
  ],
  "paths": {
    "/v1.0/GetHealth": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Health check",
        "description": "Returns a health check response.",
        "operationId": "GetHealth",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "x-ms-summary": "Success"
          }
        }
      }
    },
    "/v1.0/tenders/{id}/match-consultants": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Start CV matching for a tender",
        "operationId": "StartCvMatching",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/jobs/{jobId}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Get agent job by ID",
        "operationId": "GetAgentJob",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agentJob"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/admin/reprocess-ingestion": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Batch reprocess tender ingestion",
        "operationId": "ReprocessIngestion",
        "parameters": [
          {
            "name": "unmatchedOnly",
            "in": "query",
            "description": "If true, only reprocess tenders with no existing consultant matches",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/ingest": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Start tender ingestion",
        "operationId": "StartTenderIngestion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ingestionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/admin/reprocess-emails": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Re-fetch all emails since N days ago and re-ingest them so raw content is stored as source_email blobs",
        "operationId": "ReprocessEmails",
        "parameters": [
          {
            "name": "daysSince",
            "in": "query",
            "description": "Number of days back to fetch emails (default: 90)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/scan/doffin": {
      "post": {
        "tags": [
          "Scan"
        ],
        "summary": "Trigger a Doffin scan immediately",
        "operationId": "TriggerDoffinScan",
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/scan/email": {
      "post": {
        "tags": [
          "Scan"
        ],
        "summary": "Trigger an email scan immediately",
        "operationId": "TriggerEmailScan",
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/scan/sites": {
      "post": {
        "tags": [
          "Scan"
        ],
        "summary": "Trigger an agentic site scan immediately over all configured sources",
        "operationId": "TriggerSiteScan",
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/jobs/reap-zombies": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Manually fail pending/running jobs older than 15 min (same logic as the every-5-min timer)",
        "operationId": "ReapZombieJobsManual",
        "parameters": [
          {
            "name": "thresholdMinutes",
            "in": "query",
            "description": "Override the 15 min threshold (1-180)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of ZombieReapResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/zombieReapResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{tenderId}/audit": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "Recent audit events for a single tender, newest first",
        "operationId": "GetTenderAudit",
        "parameters": [
          {
            "name": "tenderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max events to return (default 50, max 500)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of AuditEvent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/auditEvent"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/audit/recent": {
      "get": {
        "tags": [
          "Audit"
        ],
        "summary": "Recent audit events across all tenders, newest first",
        "operationId": "GetRecentAudit",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Max events to return (default 100, max 1000)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sinceHours",
            "in": "query",
            "description": "Only events from the last N hours (default 24)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of AuditEvent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/auditEvent"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/funnel": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Pipeline funnel analytics: stage counts, conversion rates, cycle times",
        "operationId": "GetTenderFunnel",
        "parameters": [
          {
            "name": "windowDays",
            "in": "query",
            "description": "Rolling window in days (default 30, max 365)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of FunnelResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/funnelResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/stats": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Aggregated tender KPIs for the admin dashboard (by status/stage/health + activity window)",
        "operationId": "GetTenderStats",
        "parameters": [
          {
            "name": "windowDays",
            "in": "query",
            "description": "Rolling window for activity-based metrics (defaults to 30, max 365)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderStatsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/consultants/stats": {
      "get": {
        "tags": [
          "Consultants"
        ],
        "summary": "Aggregated consultant KPIs (total, availability split, avg fit score from latest matches)",
        "operationId": "GetConsultantStats",
        "responses": {
          "200": {
            "description": "Payload of ConsultantStatsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/backups": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Snapshot all Cosmos containers + (optionally) tender documents to the shared backups storage account.",
        "operationId": "CreateSalesBackup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createBackupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of BackupSummary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backupSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}/failed-tenders": {
      "delete": {
        "tags": [
          "Crawl"
        ],
        "summary": "Delete all tenders for this source whose ingestion failed (parse-failed / zero confidence)",
        "operationId": "DeleteFailedTenders",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of DeleteFailedTendersResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/deleteFailedTendersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/jobs/{jobId}/retry": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Delete the tender (if any) and enqueue a fresh ingestion for the same URL/title/externalId",
        "operationId": "RetryCrawlJob",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agentJob"
                }
              }
            }
          },
          "400": {
            "description": "No description"
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/jobs/{jobId}/cancel": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Terminate the running orchestration and mark the job as failed (\"Cancelled by operator\")",
        "operationId": "CancelCrawlJob",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agentJob"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          },
          "409": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/jobs/bulk-delete": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Delete a batch of jobs and their backing tenders",
        "operationId": "BulkDeleteCrawlJobs",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/bulkDeleteJobsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of BulkDeleteJobsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bulkDeleteJobsResponse"
                }
              }
            }
          },
          "400": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}/jobs": {
      "get": {
        "tags": [
          "Crawl"
        ],
        "summary": "Recent ingestion jobs for this source, newest first",
        "operationId": "ListCrawlJobs",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max jobs to return (default 50)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/agentJob"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}/scan": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Scan one source now and enqueue ingestion jobs for newly discovered notices",
        "operationId": "ScanCrawlSource",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of CrawlScanResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crawlScanResponse"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/stats": {
      "get": {
        "tags": [
          "Crawl"
        ],
        "summary": "High-level stats for the /admin ops dashboard",
        "operationId": "GetCrawlStats",
        "responses": {
          "200": {
            "description": "Payload of CrawlStatsResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crawlStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/stream": {
      "get": {
        "tags": [
          "Crawl"
        ],
        "summary": "Server-sent-events stream: pushes stats + activity every ~2s for the ops dashboard",
        "operationId": "StreamCrawlEvents",
        "responses": {},
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/activity": {
      "get": {
        "tags": [
          "Crawl"
        ],
        "summary": "Recent ingestion jobs across all sources, newest first. Supports source/status/date/search filters and paging.",
        "operationId": "GetCrawlActivity",
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "description": "Filter by sourceName (exact match)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Comma-separated statuses (pending,running,completed,failed)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "ISO-8601 lower bound on startedAt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "ISO-8601 upper bound on startedAt",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Substring match across inputTitle/inputUrl/externalId/id/error",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Offset for paging (default 0)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max jobs to return (default 50, max 500)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of CrawlActivityResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crawlActivityResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources": {
      "get": {
        "tags": [
          "Crawl"
        ],
        "summary": "List configured crawl sources together with their learned patterns and last-activity timestamp",
        "operationId": "ListCrawlSources",
        "responses": {
          "200": {
            "description": "Payload of Array of CrawlSourceWithPattern",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/crawlSourceWithPattern"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}": {
      "put": {
        "tags": [
          "Crawl"
        ],
        "summary": "Create or update a crawl source",
        "operationId": "UpsertCrawlSource",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/crawlSourceUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of CrawlSourceConfig",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crawlSourceConfig"
                }
              }
            }
          },
          "400": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Crawl"
        ],
        "summary": "Delete a crawl source and its cached pattern",
        "operationId": "DeleteCrawlSource",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}/pattern": {
      "delete": {
        "tags": [
          "Crawl"
        ],
        "summary": "Drop the cached URL pattern for a source so the next scan re-bootstraps it",
        "operationId": "InvalidateCrawlPattern",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/discover-listing": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Given a site homepage or bare domain, locate the tender/project listing page on it",
        "operationId": "DiscoverCrawlListing",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/discoverListingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of DiscoverListingResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/discoverListingResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          }
        ]
      }
    },
    "/v1.0/crawl/sources/{name}/preview": {
      "post": {
        "tags": [
          "Crawl"
        ],
        "summary": "Run a one-off discovery crawl for a single source and return the notices it would enqueue (no ingestion)",
        "operationId": "PreviewCrawlSource",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of CrawlPreviewResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crawlPreviewResponse"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/salesforce/opportunities/{sfId}/import": {
      "post": {
        "tags": [
          "Salesforce"
        ],
        "summary": "Create a Snøkam tender stub from an existing Salesforce Opportunity.",
        "operationId": "ImportSalesforceOpportunity",
        "parameters": [
          {
            "name": "sfId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "x-ms-summary": "Salesforce Opportunity Id."
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          },
          "409": {
            "description": "A tender is already linked to this Opportunity."
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/salesforce": {
      "post": {
        "tags": [
          "Salesforce"
        ],
        "summary": "Create a Salesforce Opportunity from a Snøkam tender and cache the link.",
        "operationId": "PromoteTenderToSalesforce",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          },
          "409": {
            "description": "Tender is already linked to a Salesforce Opportunity."
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/salesforce/refresh": {
      "post": {
        "tags": [
          "Salesforce"
        ],
        "summary": "Re-sync cached Salesforce Opportunity state (stage / closed / won) onto the engagement.",
        "operationId": "RefreshTenderSalesforceLink",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/salesforce/opportunities": {
      "get": {
        "tags": [
          "Salesforce"
        ],
        "summary": "List Salesforce Opportunities (open by default).",
        "operationId": "ListSalesforceOpportunities",
        "parameters": [
          {
            "name": "includeClosed",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "x-ms-summary": "Include closed opportunities (default false)."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-ms-summary": "Row cap, max 200 (default 100)."
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of CrmOpportunity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/crmOpportunity"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/salesforce/opportunity-stages": {
      "get": {
        "tags": [
          "Salesforce"
        ],
        "summary": "List the SF org's Opportunity pipeline stages in configured order.",
        "operationId": "ListSalesforceOpportunityStages",
        "responses": {
          "200": {
            "description": "Payload of Array of CrmStage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/crmStage"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/salesforce/refresh": {
      "post": {
        "tags": [
          "Salesforce"
        ],
        "summary": "Batch-refresh the cached Salesforce state on every linked engagement for the current business.",
        "operationId": "RefreshAllSalesforceLinks",
        "responses": {
          "200": {
            "description": "Payload of CrmRefreshResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/crmRefreshResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/salesforce/stage": {
      "post": {
        "tags": [
          "Salesforce"
        ],
        "summary": "Move the linked SF Opportunity to a new stage and refresh the cache.",
        "operationId": "UpdateTenderSalesforceStage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The SF stage masterLabel/apiName to switch to.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSalesforceStageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "400": {
            "description": "Tender has no Salesforce link, or stageName is missing."
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/cv-variants/me": {
      "get": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Get the authenticated consultant's persistent AI CV variant, if one exists.",
        "operationId": "GetMyCvVariant",
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Get or create the authenticated consultant's persistent AI CV variant (Flowcase proposal + tailored CV copy of the main CV).",
        "operationId": "EnsureMyCvVariant",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ensureCvVariantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "502": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/cv-variants/me/promote": {
      "post": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Merge the consultant's AI CV variant into the main CV.",
        "operationId": "PromoteMyCvVariant",
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          },
          "501": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/cv-variants/consultant/{email}": {
      "get": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Get a specific consultant's persistent AI CV variant, if one exists.",
        "operationId": "GetConsultantCvVariant",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Get or create a specific consultant's persistent AI CV variant (Flowcase proposal + tailored CV copy of the main CV).",
        "operationId": "EnsureConsultantCvVariant",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ensureCvVariantRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "502": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/cv-variants/consultant/{email}/promote": {
      "post": {
        "tags": [
          "CvVariants"
        ],
        "summary": "Merge a specific consultant's AI CV variant into their main CV.",
        "operationId": "PromoteConsultantCvVariant",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of ConsultantCvVariantView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/consultantCvVariantView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          },
          "501": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/consultants": {
      "get": {
        "tags": [
          "Consultants"
        ],
        "summary": "List all known consultants (for manual selection)",
        "operationId": "ListConsultants",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of ConsultantSummary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/consultantSummary"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List documents for a tender",
        "operationId": "ListTenderDocuments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of TenderDocument",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/tenderDocument"
                  }
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload a new document to a tender",
        "operationId": "UploadTenderDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderDocument",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderDocument"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/{docId}/download-url": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get a short-lived download URL for a document",
        "operationId": "GetDocumentDownloadUrl",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/{docId}/download": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Download a single document",
        "operationId": "DownloadDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of Byte",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/download-all": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Download all tender documents as a ZIP archive",
        "operationId": "DownloadAllDocuments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of Byte",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/{docId}/extract-questions": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Start extraction of fillable questions from a document",
        "operationId": "StartQuestionExtraction",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/{docId}/fill-questions": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Start filling tender question answers per consultant",
        "operationId": "StartQuestionFill",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/questionFillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/documents/{docId}": {
      "patch": {
        "tags": [
          "Documents"
        ],
        "summary": "Patch tender document flags (e.g. set as competence matrix source)",
        "operationId": "PatchTenderDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of PatchDocumentResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/patchDocumentResponse"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Delete a tender document (and its blob + related answers)",
        "operationId": "DeleteTenderDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No description"
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/protected/health/{provider}": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Checks an integration's connectivity",
        "operationId": "SalesIntegrationHealth",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Health result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/integrationHealthResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/realtime/negotiate": {
      "post": {
        "tags": [
          "Realtime"
        ],
        "summary": "Issue a SignalR access token + URL for the sales-live hub",
        "operationId": "NegotiateSignalR",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/negotiateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of NegotiateResponse",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/negotiateResponse"
                }
              }
            }
          },
          "503": {
            "description": "SignalR is not configured on this instance; fall back to SSE"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/stream": {
      "get": {
        "tags": [
          "Realtime"
        ],
        "summary": "Unified SSE stream: tender/job/crawl/consultant/audit events on one connection",
        "operationId": "StreamAll",
        "parameters": [
          {
            "name": "channels",
            "in": "query",
            "description": "Comma-separated namespaces to include (tender,job,crawl,consultant,audit). Default: all.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {},
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/stream-redirect": {
      "get": {
        "tags": [
          "Realtime"
        ],
        "summary": "Deprecated: redirects to /v1.0/stream?channels=tender,job",
        "operationId": "DeprecatedTenderStream",
        "responses": {},
        "deprecated": true,
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/crawl/stream-redirect": {
      "get": {
        "tags": [
          "Realtime"
        ],
        "summary": "Deprecated: redirects to /v1.0/stream?channels=crawl,job",
        "operationId": "DeprecatedCrawlStream",
        "responses": {},
        "deprecated": true,
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          }
        ]
      }
    },
    "/v1.0/backups/salesforce": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Full-dump all queryable and replicateable Salesforce objects to the shared backups storage account.",
        "operationId": "CreateSalesforceBackup",
        "responses": {
          "200": {
            "description": "Payload of SalesforceBackupSummary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/salesforceBackupSummary"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/document-access": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Ask Snokam for access to a tender's competition documents.",
        "operationId": "RequestTenderDocumentAccess",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/documentAccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Snokam's list of companies asking for document access on a tender.",
        "operationId": "ListTenderDocumentAccessRequests",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of TenderEngagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/tenderEngagement"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/document-access/{businessId}": {
      "put": {
        "tags": [
          "Tenders"
        ],
        "summary": "Snokam grants or denies a company access to a tender's documents.",
        "operationId": "DecideTenderDocumentAccess",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/documentAccessDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderEngagement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderEngagement"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/application": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Apply for a tender. The application goes to Snokam, who reviews it and sends it together with their own consultants.",
        "operationId": "SubmitTenderApplication",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderApplicationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Tenders"
        ],
        "summary": "Withdraw an application.",
        "operationId": "WithdrawTenderApplication",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/applications": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Snokam's inbox of applications for a tender.",
        "operationId": "ListTenderApplications",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of TenderEngagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/tenderEngagement"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/applications/{businessId}": {
      "put": {
        "tags": [
          "Tenders"
        ],
        "summary": "Snokam includes an application in the bid, or rejects it.",
        "operationId": "DecideTenderApplication",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderApplicationDecision"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderEngagement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderEngagement"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/consultants": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Assign a consultant to a tender. Idempotent: assigning the same email twice refreshes Name/Note but does not create duplicates.",
        "operationId": "AssignConsultant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assignedConsultant"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/matches/interest": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Mark a consultant's interest in a matched tender. interested=true selects the match; false deselects and dismisses it (suppressing future match notifications).",
        "operationId": "SetConsultantMatchInterest",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setMatchInterestRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/slack-messages": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Queue a Slack message for a tender (Service Bus → notifications-function).",
        "operationId": "SendTenderSlackMessage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sendTenderSlackMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No description"
          },
          "400": {
            "description": "No description"
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/consultants/{email}": {
      "delete": {
        "tags": [
          "Tenders"
        ],
        "summary": "Remove a consultant assignment from a tender. No-op if the email isn't assigned.",
        "operationId": "UnassignConsultant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "List all tenders",
        "operationId": "ListTenders",
        "responses": {
          "200": {
            "description": "Payload of Array of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/tenderView"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Create a new tender",
        "operationId": "CreateTender",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderView"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Get a tender by its URL slug (or internal id for admin use).",
        "operationId": "GetTender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "URL slug (canonical) or the internal guid id (admin/legacy).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "put": {
        "tags": [
          "Tenders"
        ],
        "summary": "Update a tender",
        "operationId": "UpdateTender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderView"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Tenders"
        ],
        "summary": "Delete a tender",
        "operationId": "DeleteTender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No description"
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/cv-proposal": {
      "put": {
        "tags": [
          "Tenders"
        ],
        "summary": "Set or replace the Flowcase proposal + tailored-CV mapping attached to a tender.",
        "operationId": "SetTenderCvProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderCvProposal"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/cv-proposal/variants": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Upsert a single tailored-CV variant on a tender's proposal (per consultant).",
        "operationId": "UpsertTenderCvVariant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tenderCvVariant"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/cv-proposal/variants/{email}": {
      "delete": {
        "tags": [
          "Tenders"
        ],
        "summary": "Remove a tailored-CV variant from a tender's proposal by consultant email.",
        "operationId": "RemoveTenderCvVariant",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/backfill-slugs": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Assign a slug to every tender that doesn't have one yet. Idempotent — safe to re-run.",
        "operationId": "BackfillTenderSlugs",
        "responses": {
          "200": {
            "description": "Payload of BackfillSlugsResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/backfillSlugsResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/reingest": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Re-run the ingestion pipeline on an existing tender, re-parsing documents and refreshing AI match / summary / classification.",
        "operationId": "ReingestTender",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agentJob"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/reingest-failed": {
      "post": {
        "tags": [
          "Tenders"
        ],
        "summary": "Re-run ingestion on every tender stuck in a failed state whose deadline has not passed. Recovers tenders left broken by an earlier ingestion outage; posts to the sales feed and matches consultants as normal.",
        "operationId": "ReingestFailedTenders",
        "responses": {
          "200": {
            "description": "Payload of ReingestFailedResult",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reingestFailedResult"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/jobs/{jobId}/snapshot": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Return the tender as it looked right after a given agent job ran (time-travel view).",
        "operationId": "GetTenderJobSnapshot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of TenderView",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tenderView"
                }
              }
            }
          },
          "404": {
            "description": "No description"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/{id}/jobs": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Recent agent jobs (ingestion, CV matching, …) for a tender — newest first.",
        "operationId": "ListTenderJobs",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-ms-summary": "Max rows (default 10, capped at 100)."
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Array of AgentJob",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/agentJob"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/admin/tenders": {
      "delete": {
        "tags": [
          "Admin"
        ],
        "summary": "Delete all tenders",
        "operationId": "DeleteAllTenders",
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/admin/reprocess-matches": {
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Trigger CV matching on all tenders",
        "operationId": "ReprocessMatches",
        "parameters": [
          {
            "name": "unmatchedOnly",
            "in": "query",
            "description": "If true, only re-match tenders with no existing consultant matches",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of Object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/export.csv": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Export tenders matching the given filters as RFC 4180 CSV",
        "operationId": "ExportTendersCsv",
        "parameters": [
          {
            "name": "stage",
            "in": "query",
            "description": "Filter by status.stage (e.g. discovery, qualification)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filter by status.state (e.g. active, irrelevant, ingestion_failed)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromDate",
            "in": "query",
            "description": "Only include tenders with foundAt >= fromDate (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toDate",
            "in": "query",
            "description": "Only include tenders with foundAt <= toDate (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payload of String",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "x-ms-summary": "CSV file with one tender per row"
          }
        },
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1.0/tenders/stream": {
      "get": {
        "tags": [
          "Tenders"
        ],
        "summary": "Server-sent-events stream of tender.created / tender.updated / tender.deleted events",
        "operationId": "StreamTenderEvents",
        "responses": {},
        "security": [
          {
            "Implicit": [
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
            ]
          },
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "agentJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "jobType": {
            "type": "string",
            "nullable": true
          },
          "tenderId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "string",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "triggeredBy": {
            "type": "string",
            "nullable": true
          },
          "orchestrationId": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "sourceName": {
            "type": "string",
            "nullable": true
          },
          "inputUrl": {
            "type": "string",
            "nullable": true
          },
          "inputTitle": {
            "type": "string",
            "nullable": true
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/agentJobLogEntry"
            },
            "nullable": true
          },
          "afterSnapshot": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "agentJobLogEntry": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "level": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            },
            "nullable": true
          }
        }
      },
      "assignedConsultant": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "assignedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "assignedBy": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "auditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "tenderId": {
            "type": "string",
            "nullable": true
          },
          "actorEmail": {
            "type": "string",
            "nullable": true
          },
          "actorSource": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "beforeSnapshot": {
            "$ref": "#/components/schemas/auditSnapshot"
          },
          "afterSnapshot": {
            "$ref": "#/components/schemas/auditSnapshot"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "auditSnapshot": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "consultantMatchCount": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "selectedConsultantIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "nullable": true
      },
      "backfillSlugsResult": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "alreadyHad": {
            "type": "integer",
            "format": "int32"
          },
          "updated": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "backupSummary": {
        "type": "object",
        "properties": {
          "blobAccount": {
            "type": "string"
          },
          "container": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "containers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/containerBackup"
            }
          },
          "documentsCopied": {
            "type": "integer",
            "format": "int32"
          },
          "documentsBytes": {
            "type": "integer",
            "format": "int64"
          },
          "documentsFailures": {
            "type": "integer",
            "format": "int32"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "bulkDeleteJobError": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "bulkDeleteJobsRequest": {
        "type": "object",
        "properties": {
          "jobIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "bulkDeleteJobsResponse": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "integer",
            "format": "int32"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/bulkDeleteJobError"
            }
          }
        }
      },
      "consultantAnswers": {
        "type": "object",
        "properties": {
          "consultantId": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "filledDocumentId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "consultantCvVariantView": {
        "type": "object",
        "properties": {
          "consultantEmail": {
            "type": "string",
            "nullable": true
          },
          "consultantName": {
            "type": "string",
            "nullable": true
          },
          "proposalId": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "mainCvId": {
            "type": "string",
            "nullable": true
          },
          "variantCvId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "promotedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "consultantMatch": {
        "type": "object",
        "properties": {
          "consultantId": {
            "type": "string",
            "nullable": true
          },
          "businessId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "fitScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "availabilityStatus": {
            "type": "string",
            "nullable": true
          },
          "availableFrom": {
            "type": "string",
            "nullable": true
          },
          "matchedTechnologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "missingTechnologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "selected": {
            "type": "boolean",
            "nullable": true
          },
          "dismissed": {
            "type": "boolean",
            "nullable": true
          },
          "dismissedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "fitExplanation": {
            "type": "string",
            "nullable": true
          },
          "cvSummary": {
            "type": "string",
            "nullable": true
          },
          "seniority": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "notifiedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "consultantChannelNotifiedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "consultantStatsResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "available": {
            "type": "integer",
            "format": "int32"
          },
          "onAssignment": {
            "type": "integer",
            "format": "int32"
          },
          "unknownAvailability": {
            "type": "integer",
            "format": "int32"
          },
          "avgFitScore": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        }
      },
      "consultantSummary": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "yearsExperience": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "containerBackup": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "blobPath": {
            "type": "string"
          },
          "itemCount": {
            "type": "integer",
            "format": "int32"
          },
          "compressedBytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "crawlActivityResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/agentJob"
            }
          },
          "total": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "crawledNotice": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "crawlPattern": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string"
          },
          "detailUrlRegex": {
            "type": "string"
          },
          "paginationUrlRegex": {
            "type": "string"
          },
          "sampleCount": {
            "type": "integer",
            "format": "int32"
          },
          "bootstrappedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "crawlPreviewResponse": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string"
          },
          "notices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/crawledNotice"
            }
          },
          "pattern": {
            "$ref": "#/components/schemas/crawlPattern"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "crawlScanResponse": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string"
          },
          "discovered": {
            "type": "integer",
            "format": "int32"
          },
          "queued": {
            "type": "integer",
            "format": "int32"
          },
          "merged": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "crawlSourceConfig": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "seedUrl": {
            "type": "string"
          },
          "maxPages": {
            "type": "integer",
            "format": "int32"
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "crawlSourceUpsertRequest": {
        "type": "object",
        "properties": {
          "seedUrl": {
            "type": "string"
          },
          "maxPages": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "crawlSourceWithPattern": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/crawlSourceConfig"
          },
          "pattern": {
            "$ref": "#/components/schemas/crawlPattern"
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "crawlStatsResponse": {
        "type": "object",
        "properties": {
          "sourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "enabledSourceCount": {
            "type": "integer",
            "format": "int32"
          },
          "tendersActive": {
            "type": "integer",
            "format": "int32"
          },
          "tendersIrrelevant": {
            "type": "integer",
            "format": "int32"
          },
          "tendersIngestionFailed": {
            "type": "integer",
            "format": "int32"
          },
          "jobsPending": {
            "type": "integer",
            "format": "int32"
          },
          "jobsRunning": {
            "type": "integer",
            "format": "int32"
          },
          "jobsCompleted": {
            "type": "integer",
            "format": "int32"
          },
          "jobsFailed": {
            "type": "integer",
            "format": "int32"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/sourceSummary"
            }
          }
        }
      },
      "createBackupRequest": {
        "type": "object",
        "properties": {
          "includeDocuments": {
            "type": "boolean"
          }
        }
      },
      "crmOpportunity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "stage": {
            "type": "string"
          },
          "closeDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean"
          },
          "isWon": {
            "type": "boolean"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "account": {
            "$ref": "#/components/schemas/crmParty"
          },
          "owner": {
            "$ref": "#/components/schemas/crmParty"
          },
          "tenderId": {
            "type": "string"
          },
          "locator": {
            "$ref": "#/components/schemas/crmRecordLocator"
          }
        }
      },
      "crmParty": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "crmRecordLocator": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "crmRefreshResult": {
        "type": "object",
        "properties": {
          "checked": {
            "type": "integer",
            "format": "int32"
          },
          "updated": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "crmStage": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "apiName": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "isClosed": {
            "type": "boolean"
          },
          "isWon": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "deleteFailedTendersResponse": {
        "type": "object",
        "properties": {
          "sourceName": {
            "type": "string"
          },
          "matched": {
            "type": "integer",
            "format": "int32"
          },
          "deleted": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "discoverListingRequest": {
        "type": "object",
        "properties": {
          "homeUrl": {
            "type": "string"
          }
        }
      },
      "discoverListingResponse": {
        "type": "object",
        "properties": {
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/listingCandidate"
            }
          }
        }
      },
      "documentAccessDecision": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "decisionNote": {
            "type": "string"
          }
        }
      },
      "documentAccessRequest": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string"
          }
        }
      },
      "ensureCvVariantRequest": {
        "type": "object",
        "properties": {
          "consultantName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "externalSourceRef": {
        "type": "object",
        "properties": {
          "system": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "discoveredAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "extractedQuestion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "nullable": true
          },
          "expectedAnswerShape": {
            "type": "string",
            "nullable": true
          },
          "section": {
            "type": "string",
            "nullable": true
          },
          "sourceExcerpt": {
            "type": "string",
            "nullable": true
          },
          "placeholder": {
            "type": "string",
            "nullable": true
          },
          "currentValue": {
            "type": "string",
            "nullable": true
          },
          "sourceStrategy": {
            "type": "string",
            "nullable": true
          },
          "suggestedDataSource": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "$ref": "#/components/schemas/questionLocation"
          }
        }
      },
      "extractedQuestionSet": {
        "type": "object",
        "properties": {
          "isFillable": {
            "type": "boolean",
            "nullable": true
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/extractedQuestion"
            },
            "nullable": true
          },
          "extractedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "nullable": true
      },
      "funnelResponse": {
        "type": "object",
        "properties": {
          "windowDays": {
            "type": "integer",
            "format": "int32"
          },
          "countByStage": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "conversionRates": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "avgCycleDays": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "double"
            }
          },
          "wonCount": {
            "type": "integer",
            "format": "int32"
          },
          "lostCount": {
            "type": "integer",
            "format": "int32"
          },
          "winRatePct": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "stageTransitionsInWindow": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "ingestionAttachment": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "blobPath": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "ingestionRequest": {
        "type": "object",
        "properties": {
          "sourceType": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "existingTenderId": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ingestionAttachment"
            },
            "nullable": true
          }
        }
      },
      "integrationHealthResult": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "listingCandidate": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "confidence": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "negotiateRequest": {
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "negotiateResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "accessToken": {
            "type": "string"
          },
          "hubName": {
            "type": "string"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "patchDocumentRequest": {
        "type": "object",
        "properties": {
          "isCompetenceMatrixSource": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "patchDocumentResponse": {
        "type": "object",
        "properties": {
          "document": {
            "$ref": "#/components/schemas/tenderDocument"
          },
          "extractionJob": {
            "$ref": "#/components/schemas/agentJob"
          }
        }
      },
      "questionFillRequest": {
        "type": "object",
        "properties": {
          "consultantEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        }
      },
      "questionLocation": {
        "type": "object",
        "properties": {
          "xmlPart": {
            "type": "string",
            "nullable": true
          },
          "bodyIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "tableIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "rowIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "colIndex": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sdtId": {
            "type": "string",
            "nullable": true
          },
          "sheetName": {
            "type": "string",
            "nullable": true
          },
          "cellReference": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "reingestFailedResult": {
        "type": "object",
        "properties": {
          "totalFailed": {
            "type": "integer",
            "format": "int32"
          },
          "actionable": {
            "type": "integer",
            "format": "int32"
          },
          "scheduled": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "salesforceBackupSummary": {
        "type": "object",
        "properties": {
          "blobAccount": {
            "type": "string"
          },
          "container": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "objectsDiscovered": {
            "type": "integer",
            "format": "int32"
          },
          "objectsBackedUp": {
            "type": "integer",
            "format": "int32"
          },
          "objectsFailed": {
            "type": "integer",
            "format": "int32"
          },
          "recordsExported": {
            "type": "integer",
            "format": "int64"
          },
          "compressedBytes": {
            "type": "integer",
            "format": "int64"
          },
          "manifestPath": {
            "type": "string"
          },
          "objects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/salesforceObjectBackup"
            }
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "salesforceObjectBackup": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "blobPath": {
            "type": "string"
          },
          "jobId": {
            "type": "string"
          },
          "records": {
            "type": "integer",
            "format": "int64"
          },
          "compressedBytes": {
            "type": "integer",
            "format": "int64"
          },
          "deletedRecords": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "sendTenderSlackMessageRequest": {
        "type": "object",
        "properties": {
          "employeeName": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "setMatchInterestRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "interested": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "sourceFile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "sourceSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "seedUrl": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "hasPattern": {
            "type": "boolean"
          },
          "patternSampleCount": {
            "type": "integer",
            "format": "int32"
          },
          "patternBootstrappedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "tenderApplication": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "submittedBy": {
            "type": "string",
            "nullable": true
          },
          "consultantEmails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "decidedBy": {
            "type": "string",
            "nullable": true
          },
          "decisionNote": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderApplicationDecision": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "decisionNote": {
            "type": "string"
          }
        }
      },
      "tenderApplicationRequest": {
        "type": "object",
        "properties": {
          "consultantEmails": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "tenderAudit": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedBy": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderClassification": {
        "type": "object",
        "properties": {
          "technologies": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "competenceAreas": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "languageRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "seniorityRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "securityRequirements": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderCvProposal": {
        "type": "object",
        "properties": {
          "proposalId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tenderCvVariant"
            },
            "nullable": true
          }
        }
      },
      "tenderCvVariant": {
        "type": "object",
        "properties": {
          "consultantEmail": {
            "type": "string",
            "nullable": true
          },
          "consultantName": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "tailoredCvId": {
            "type": "string",
            "nullable": true
          },
          "attachmentId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "tenderDates": {
        "type": "object",
        "properties": {
          "foundAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deadlineAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "consultantId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "reviewStatus": {
            "type": "string",
            "nullable": true
          },
          "sharepointUrl": {
            "type": "string",
            "nullable": true
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastReviewedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "blobPath": {
            "type": "string",
            "nullable": true
          },
          "blobUrl": {
            "type": "string",
            "nullable": true
          },
          "sourceUrl": {
            "type": "string",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "downloadedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "textContent": {
            "type": "string",
            "nullable": true
          },
          "isCompetenceMatrixSource": {
            "type": "boolean",
            "nullable": true
          },
          "classificationReasoning": {
            "type": "string",
            "nullable": true
          },
          "extractedQuestions": {
            "$ref": "#/components/schemas/extractedQuestionSet"
          },
          "questionAnswers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/consultantAnswers"
            },
            "nullable": true
          },
          "extractionStatus": {
            "type": "string",
            "nullable": true
          },
          "extractionError": {
            "type": "string",
            "nullable": true
          },
          "extractionStartedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "tenderDocumentAccess": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requestedBy": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "decidedBy": {
            "type": "string",
            "nullable": true
          },
          "decisionNote": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderEngagement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "businessId": {
            "type": "string",
            "nullable": true
          },
          "tenderId": {
            "type": "string",
            "nullable": true
          },
          "consultantMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/consultantMatch"
            },
            "nullable": true
          },
          "assignedConsultants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/assignedConsultant"
            },
            "nullable": true
          },
          "cvProposal": {
            "$ref": "#/components/schemas/tenderCvProposal"
          },
          "salesforce": {
            "$ref": "#/components/schemas/tenderSalesforce"
          },
          "documentAccess": {
            "$ref": "#/components/schemas/tenderDocumentAccess"
          },
          "application": {
            "$ref": "#/components/schemas/tenderApplication"
          },
          "audit": {
            "$ref": "#/components/schemas/tenderAudit"
          },
          "hasGrantedDocumentAccess": {
            "type": "boolean"
          }
        }
      },
      "tenderInfo": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "customer": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "workMode": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderParser": {
        "type": "object",
        "properties": {
          "lastRunAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "confidence": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderSalesforce": {
        "type": "object",
        "properties": {
          "opportunityId": {
            "type": "string",
            "nullable": true
          },
          "stageName": {
            "type": "string",
            "nullable": true
          },
          "isClosed": {
            "type": "boolean",
            "nullable": true
          },
          "isWon": {
            "type": "boolean",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "lastSyncedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderSource": {
        "type": "object",
        "properties": {
          "externalTenderId": {
            "type": "string",
            "nullable": true
          },
          "sourceSystem": {
            "type": "string",
            "nullable": true
          },
          "sourceUrl": {
            "type": "string",
            "nullable": true
          },
          "sourceFiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/sourceFile"
            },
            "nullable": true
          },
          "additionalSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/externalSourceRef"
            },
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderStatsResponse": {
        "type": "object",
        "properties": {
          "byStatus": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "byStage": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "byHealth": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "windowDays": {
            "type": "integer",
            "format": "int32"
          },
          "tendersInWindow": {
            "type": "integer",
            "format": "int32"
          },
          "consultantsMatched": {
            "type": "integer",
            "format": "int32"
          },
          "avgTimeToMatchHours": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        }
      },
      "tenderStatus": {
        "type": "object",
        "properties": {
          "stage": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "health": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "tenderTodo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "assignedTo": {
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "tenderView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "$ref": "#/components/schemas/tenderSource"
          },
          "info": {
            "$ref": "#/components/schemas/tenderInfo"
          },
          "dates": {
            "$ref": "#/components/schemas/tenderDates"
          },
          "status": {
            "$ref": "#/components/schemas/tenderStatus"
          },
          "classification": {
            "$ref": "#/components/schemas/tenderClassification"
          },
          "parser": {
            "$ref": "#/components/schemas/tenderParser"
          },
          "todos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tenderTodo"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tenderDocument"
            },
            "nullable": true
          },
          "businessIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "consultantMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/consultantMatch"
            },
            "nullable": true
          },
          "assignedConsultants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/assignedConsultant"
            },
            "nullable": true
          },
          "cvProposal": {
            "$ref": "#/components/schemas/tenderCvProposal"
          },
          "audit": {
            "$ref": "#/components/schemas/tenderAudit"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "timeline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/timelineEvent"
            },
            "nullable": true
          },
          "blobContainer": {
            "type": "string",
            "nullable": true
          },
          "salesforce": {
            "$ref": "#/components/schemas/tenderSalesforce"
          }
        }
      },
      "timelineEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "mandatory": {
            "type": "boolean",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "updateSalesforceStageRequest": {
        "type": "object",
        "properties": {
          "stageName": {
            "type": "string"
          }
        }
      },
      "zombieReapResult": {
        "type": "object",
        "properties": {
          "scanned": {
            "type": "integer",
            "format": "int32"
          },
          "reaped": {
            "type": "integer",
            "format": "int32"
          },
          "reapedJobIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Implicit": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",
            "tokenUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
            "refreshUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
            "scopes": {
              "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default": "Default function scope"
            }
          }
        }
      },
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}