{"openapi":"3.0.0","info":{"title":"Kosmobids Public API","version":"1.0.0","description":"The Kosmobids Public API gives a company programmatic access to the same tender data and document workflows that power the Kosmobids application. It is designed for server-side integrations, internal tools, and AI agents that need structured procurement data rather than a user interface.\n\nThe same operations are available over two transports: a REST API under `/api/v1` and an MCP server at `/mcp`. They share authentication, company scoping, rate limits, results, and errors. See the [MCP server reference](/docs/reference/mcp) for connection details and the tool list.\n\n## What you can do\n\n| Capability | HTTP endpoints |\n|---|---|\n| Read the company pipeline | `GET /pipeline` |\n| Move, tag, and archive pipeline tenders | `GET /pipeline/stages`, `PUT /pipeline/:id/stage`, `PUT /pipeline/:id/tags`, `POST`/`DELETE /pipeline/:id/archive` |\n| Add a company-private tender | `POST /pipeline/private-tenders` |\n| Run ad-hoc searches | `POST /search` |\n| Manage saved searches and matching runs | `/saved-searches` and `/saved-searches/:id/runs` |\n| Read tender, notice, and look-alike data | `/tenders/*`, `/notices/:noticeId` |\n| Upload, download, and read tender documents | `POST`/`GET /tenders/:id/files`, `/files/:id/download`, `/documents/:id` |\n| Analyze documents with citations | `POST /tenders/:id/analyze`, `GET /analyses/:workflowId` |\n| Post comments | `POST /tenders/:id/api-comments` |\n\nThe interactive reference is at the site root (`/`). The generated OpenAPI document is at [/api/v1/schema](/api/v1/schema). A machine-readable documentation index is at [/llms.txt](/llms.txt).\n\n## Transports\n\n| Transport | Endpoint | Auth | Best for |\n|---|---|---|---|\n| HTTP | `https://api.kosmobids.com/api/v1` | `x-api-key` header | Server-side integrations, CI, uploads and downloads, any language |\n| MCP | `https://api.kosmobids.com/mcp` | `Authorization: Bearer` or `x-api-key` | AI clients and agents that speak Model Context Protocol |\n\nBoth transports expose the same operations and the same results. Multipart uploads and binary downloads are HTTP-only because MCP tools carry JSON. See the [MCP server reference](/docs/reference/mcp) for the tool list and transport differences.\n\n## Base URL and versioning\n\n```\nhttps://api.kosmobids.com/api/v1\n```\n\nThe version is part of the path. Changes within `v1` are additive: new fields and endpoints may appear, but existing fields keep their meaning. Treat unknown response fields as forward-compatible and do not rely on field order.\n\n## Authentication\n\nSend your API key in the `x-api-key` header on every authenticated request (`GET /api/v1/status` is public):\n\n```bash\ncurl https://api.kosmobids.com/api/v1/pipeline \\\n  -H \"x-api-key: $KOSMOBIDS_API_KEY\"\n```\n\nAPI keys are issued per company. Never expose a key in a browser, mobile app, or public repository; make requests from a server you control. See [Authentication and company scoping](/docs/concepts/authentication-and-scoping) for the full model.\n\nOver MCP, send the same key as `Authorization: Bearer $KOSMOBIDS_API_KEY` (or `x-api-key`). The key still determines the company; tools never accept a company ID.\n\n## Response envelope\n\nSuccessful responses wrap the payload in `data` and set `error` to `null`:\n\n```json\n{\n  \"data\": {\n    \"tenders\": [],\n    \"nextCursor\": null,\n    \"hasMore\": false\n  },\n  \"error\": null\n}\n```\n\nValidation failures return HTTP `422` with the opposite shape:\n\n```json\n{\n  \"data\": null,\n  \"error\": [\n    { \"field\": \"body.questions\", \"type\": \"body\", \"message\": \"Too small: expected array to have >=1 items\" }\n  ]\n}\n```\n\nThe binary download endpoint (`GET /files/:fileId/download`) returns the file stream, not a JSON envelope.\n\n## Status codes\n\n| Status | Meaning |\n|---|---|\n| `200` | Success. |\n| `201` | Resource created (saved search, comment). |\n| `202` | Asynchronous work accepted (download or analysis scheduled). |\n| `400` / `422` | Request validation failed. The public API normalises private validation errors to `422`. |\n| `401` | Missing or invalid API key. |\n| `403` | The key is not allowed to use the endpoint, or the key has no company scope. |\n| `404` | The resource does not exist or belongs to another company. |\n| `409` | A business rule was violated, such as the saved-search limit or documents not being ready. |\n| `500` | Unexpected server error, including internal service-authentication failures. |\n| `502` | The internal service request failed. |\n| `503` | A required backend service is not configured or unavailable. |\n\n## Asynchronous operations\n\nThree workflows are asynchronous and must be polled:\n\n- Tender document download (`POST /tenders/:tenderId/documents/download`).\n- Saved-search matching runs (`POST /saved-searches/:savedSearchId/runs`).\n- Document analysis (`POST /tenders/:tenderId/analyze`).\n\nThere are no webhooks in `v1`. See [Asynchronous work and polling](/docs/concepts/async-and-polling) for status values, final-state detection, and backoff guidance. Over MCP, the same endpoints are tools that return the run or workflow ID; poll `list_saved_search_run_matches` or `get_document_analysis`.\n\n## Start here\n\n1. [Quickstart](/docs/tutorials/quickstart): make your first request and read the envelope.\n2. [Read the pipeline](/docs/concepts/pipeline-and-pagination): cursor pagination and every pipeline field.\n3. [Update the pipeline](/docs/concepts/updating-the-pipeline): move stages, replace tags, archive and restore.\n4. [Find and qualify tenders](/docs/tutorials/find-and-qualify-tenders): search, hydrate, and interpret relevance.\n5. [Automate a saved search](/docs/tutorials/automate-a-saved-search): create a saved search, run it, and poll results.\n6. [Download and read documents](/docs/tutorials/download-and-read-documents): trigger a download and read OCR pages.\n7. [Analyze and cite](/docs/tutorials/analyze-and-cite): ask questions and resolve citations.\n8. [Look-alike discovery](/docs/tutorials/look-alike-discovery): expand from a strong tender.\n9. [Build an agent](/docs/tutorials/build-an-agent): orchestrate the full flow.\n10. [Connect an MCP client](/docs/reference/mcp): connect with Bearer auth, list the tools, and choose where MCP stops and HTTP takes over.\n\nSee [the changelog](/docs/reference/changelog) for API changes.\n\n## Operational endpoints\n\n`GET /health` and `GET /api/v1/status` are unauthenticated. `/health` returns process health; `/api/v1/status` is a lightweight readiness check that does not require an API key."},"paths":{"/api/v1/pipeline":{"get":{"summary":"List pipeline tenders","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenders":{"type":"array","items":{"type":"object","properties":{"tenderId":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string"},"assignee":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"description":{"type":"string"},"notes":{"type":"string","nullable":true},"kosmobidsAppUrl":{"type":"string"},"country":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"],"nullable":true},"value_eur":{"type":"number","nullable":true},"contractingAuthority":{"type":"object","properties":{"name":{"type":"string","nullable":true},"address":{"type":"string","nullable":true}},"additionalProperties":false,"required":["name","address"]},"submissionDate":{"type":"string","nullable":true},"publishDate":{"type":"string"},"archivedAt":{"type":"string","nullable":true}},"additionalProperties":false,"required":["tenderId","stage","status","tags","title","description","kosmobidsAppUrl","country","contractingAuthority","submissionDate","publishDate","archivedAt"]}},"nextCursor":{"type":"string","nullable":true},"hasMore":{"type":"boolean"}},"additionalProperties":false,"required":["tenders","nextCursor","hasMore"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Returns a cursor-paginated page of tenders tracked in the company pipeline, enriched with tender metadata. Pipeline items do not include match scores; use saved-search runs or search for relevance data. Archived tenders are excluded by default; pass archived=include or archived=only to read them.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"schema":{"type":"string"}},{"name":"archived","in":"query","required":true,"schema":{"type":"string"}}],"operationId":"listPipelineTenders"}},"/api/v1/pipeline/stages":{"get":{"summary":"List pipeline stages","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["active","terminal"]},"position":{"type":"number"},"isDefaultEntry":{"type":"boolean"}},"additionalProperties":false,"required":["key","label","kind","position","isDefaultEntry"]}}},"additionalProperties":false,"required":["stages"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Lists the company's visible pipeline stages, ordered by board position. Stage keys are the identifiers accepted by the stage write endpoint; labels are display-only and can be renamed.","operationId":"listPipelineStages"}},"/api/v1/pipeline/{tenderId}/stage":{"put":{"summary":"Move a tender to another stage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"stage":{"type":"string"},"stageLabel":{"type":"string"},"stageChangedAt":{"type":"string"},"changed":{"type":"boolean"}},"additionalProperties":false,"required":["stage","stageLabel","stageChangedAt","changed"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"validStages":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Moves a pipeline tender to another stage. Idempotent: moving a tender to the stage it is already in returns 200 with changed=false and records no activity. Only the stage changes — pipeline membership, tags, notes, and archive state are untouched.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stage":{"type":"string"}},"additionalProperties":false,"required":["stage"]}}}},"operationId":"updatePipelineStage"}},"/api/v1/pipeline/{tenderId}/tags":{"put":{"summary":"Replace tender tags","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"changed":{"type":"boolean"}},"additionalProperties":false,"required":["tags","changed"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"validStages":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Replaces the tags on a pipeline tender. This is a full replacement, not a merge: send the complete tag list, or an empty array to clear it. Tags are trimmed and de-duplicated, capped at 20 per tender and 40 characters each; unknown tags are added to the company tag vocabulary.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["tags"]}}}},"operationId":"updatePipelineTags"}},"/api/v1/pipeline/{tenderId}/archive":{"post":{"summary":"Archive a pipeline tender","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"archived":{"type":"boolean"},"archivedAt":{"type":"string","nullable":true},"changed":{"type":"boolean"}},"additionalProperties":false,"required":["archived","archivedAt","changed"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"validStages":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Archives a pipeline tender. Archiving hides it from the default pipeline read but keeps it in the pipeline, so it can be restored. Idempotent: archiving an already-archived tender returns 200 with changed=false.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"archivePipelineTender"},"delete":{"summary":"Restore an archived tender","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"archived":{"type":"boolean"},"archivedAt":{"type":"string","nullable":true},"changed":{"type":"boolean"}},"additionalProperties":false,"required":["archived","archivedAt","changed"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"validStages":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Restores an archived pipeline tender. Idempotent: restoring a tender that is not archived returns 200 with changed=false.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"unarchivePipelineTender"}},"/api/v1/pipeline/private-tenders":{"post":{"summary":"Add a private tender","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"noticeId":{"type":"string"},"tenderIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["noticeId","tenderIds"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Creates a private tender that belongs only to the API key company. It is stored with private provenance, is excluded from matching and semantic search, and can be read through the tender, file, and document endpoints. The company is taken from the API key; companyId is not accepted in the body. Each call creates a new tender, so retries are not idempotent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buyerName":{"type":"string"},"title":{"type":"string"},"country":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]},"submissionDeadline":{"type":"string"},"description":{"type":"string"},"valueEUR":{"type":"number"},"publicationDate":{"type":"string"},"urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false,"required":["url"]}}},"additionalProperties":false,"required":["buyerName","title","country","submissionDeadline"]}}}},"operationId":"createPrivateTender"}},"/api/v1/tenders/{tenderId}/files":{"get":{"summary":"List tender files","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"zip":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"extension":{"type":"string"},"sizeBytes":{"type":"number"},"mimeType":{"type":"string"},"lifecycle":{"type":"string","enum":["active","archived","removed"]},"origin":{"type":"string","enum":["tender","user-upload"]},"processingStatus":{"type":"string","enum":["not_applicable","new","in_progress","done","error","skipped","removed"]},"documentStatus":{"type":"string","enum":["new","error","processed"],"nullable":true},"fileId":{"type":"string","nullable":true}},"additionalProperties":false,"required":["id","filename","extension","sizeBytes","mimeType","lifecycle","origin","processingStatus","documentStatus"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"extension":{"type":"string"},"sizeBytes":{"type":"number"},"mimeType":{"type":"string"},"lifecycle":{"type":"string","enum":["active","archived","removed"]},"origin":{"type":"string","enum":["tender","user-upload"]},"processingStatus":{"type":"string","enum":["not_applicable","new","in_progress","done","error","skipped","removed"]},"documentStatus":{"type":"string","enum":["new","error","processed"],"nullable":true},"fileId":{"type":"string","nullable":true}},"additionalProperties":false,"required":["id","filename","extension","sizeBytes","mimeType","lifecycle","origin","processingStatus","documentStatus"]}}},"additionalProperties":false,"required":["files"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Lists the uploaded files for a tender. The lot is resolved to its source tender internally. Use the zip endpoint to download all files at once.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"listTenderFiles"},"post":{"summary":"Upload a tender document","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileId":{"type":"string"},"fileName":{"type":"string"},"tenderId":{"type":"string"},"noticeId":{"type":"string"},"processingStatus":{"type":"string","enum":["not_applicable","new","in_progress","done","error","skipped","removed"]}},"additionalProperties":false,"required":["fileId","fileName","tenderId","noticeId","processingStatus"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Uploads a document to a tender and attaches it to the tender's notice, so every lot of that notice sees it. Send multipart/form-data with the binary in the `file` field; the optional `file_name` field overrides the display name. Accepted types: PDF, DOCX, XLSX, XLS, RTF, TXT, JPEG, PNG, up to 25 MB. The upload is stored for your company only and OCR processing starts immediately: poll GET /tenders/:tenderId/files until the file's documentStatus is `processed` (not `processingStatus`, which tracks search-store ingestion), which makes it readable and citable by the document and analysis endpoints. Not idempotent: each request creates a new file.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string"}},"additionalProperties":false}}}},"operationId":"uploadTenderDocument"}},"/api/v1/tenders/{tenderId}/files/zip":{"get":{"summary":"Download tender files as a zip","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Streams the precomputed zip of uploaded files for a tender when one exists, falling back to building it on demand. Returns binary content, not the JSON response envelope.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"downloadTenderFilesZip"}},"/api/v1/files/{fileId}/download":{"get":{"summary":"Download a file","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["pipeline"],"description":"Streams an uploaded file by ID. Returns binary content, not the JSON response envelope.","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"downloadFile"}},"/api/v1/search":{"post":{"summary":"Run a search","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number"},"rerankingScore":{"type":"number"},"recommended":{"type":"boolean"},"match":{"type":"boolean"}},"additionalProperties":false,"required":["id"]}}},"additionalProperties":false,"required":["results"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["search"],"description":"Runs a search scoped to the API key company. Provide a savedSearchId to reuse a saved search, or criteria/options for an ad-hoc search. Results contain tender IDs and relevance signals, not full tender details.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"savedSearchId":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}},"operationId":"runSearch"}},"/api/v1/saved-searches":{"get":{"summary":"List saved searches","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"profiles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"companyId":{"type":"string"},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"required":["id","companyId","name"]}}},"additionalProperties":false,"required":["profiles"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Lists all saved searches for the API key company.","operationId":"listSavedSearches"},"post":{"summary":"Create a saved search","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"companyId":{"type":"string"},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"required":["id","companyId","name"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error","message"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Creates a saved search for the API key company. Up to 10 saved searches per company; an 11th returns 409.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"required":["name"]}}}},"operationId":"createSavedSearch"}},"/api/v1/saved-searches/{savedSearchId}":{"get":{"summary":"Get a saved search","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"companyId":{"type":"string"},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"required":["id","companyId","name"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Gets a saved search by ID. Returns 404 when it belongs to another company.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getSavedSearch"},"patch":{"summary":"Update a saved search","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"companyId":{"type":"string"},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"required":["id","companyId","name"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Updates a saved search. Returns 404 when it belongs to another company.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"options":{"type":"object","properties":{"type":{"type":"string","enum":["mixed","streamlined"]},"reranker":{"type":"string","enum":["jina","cohere"]},"searchPhrase":{"type":"array","items":{"type":"object","properties":{"phrase":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false,"required":["phrase","id"]}},"recommendedFilter":{"type":"string"},"sort":{"type":"string","enum":["deadline","published","value","country"]},"sortDir":{"type":"string","enum":["desc","asc"]},"evaluationPrompt":{"type":"string"},"scheduledRun":{"type":"boolean"},"autoApprove":{"type":"boolean"},"includeCompanyDescription":{"type":"boolean"},"pipelineDefaultTags":{"type":"array","items":{"type":"string"}},"pipelineDefaultOwnerId":{"type":"string","nullable":true},"expandKeywords":{"type":"boolean"},"overrideSavedSearch":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}}}},"operationId":"updateSavedSearch"},"delete":{"summary":"Delete a saved search","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Soft-deletes a saved search. Returns 404 when it belongs to another company.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteSavedSearch"}},"/api/v1/saved-searches/{savedSearchId}/runs":{"post":{"summary":"Start a matching run","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"workflowId":{"type":"string"},"status":{"type":"undefined","enum":[null]}},"additionalProperties":false,"required":["runId","workflowId","status"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Starts an asynchronous matching run for a saved search. Matches are kept as previews unless publishMatches is true. Poll the run-matches endpoint until isFinalStatus is true.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"publishMatches":{"type":"boolean"},"evaluationPrompt":{"type":"string"},"includeCompanyDescription":{"type":"boolean"}},"additionalProperties":false}}}},"operationId":"startSavedSearchRun"},"get":{"summary":"List matching runs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"searchProfileId":{"type":"string"},"companyId":{"type":"string"},"runId":{"type":"string"},"tag":{"type":"string"},"triggerSource":{"type":"string"},"status":{"type":"string","enum":["new","in_progress","done","error"]},"created_at":{"type":"string"}},"additionalProperties":false,"required":["id","searchProfileId","companyId","runId","tag","status","created_at"]}},"total":{"type":"number"}},"additionalProperties":false,"required":["runs","total"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Lists matching runs for a saved search, newest first.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"listSavedSearchRuns"}},"/api/v1/saved-searches/{savedSearchId}/runs/{runId}/matches":{"get":{"summary":"List run matches","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"runId":{"type":"string"},"searchProfileId":{"type":"string"},"status":{"type":"string","enum":["new","in_progress","done","error"]},"isFinalStatus":{"type":"boolean"},"matchScores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tender_id":{"type":"string"},"company_id":{"type":"string"},"tag":{"type":"string"},"evaluation":{"type":"object","properties":{"fit":{"type":"string","enum":["match","industry_match","not_match"]},"reasoning":{"type":"string"},"origin":{"type":"array","items":{"type":"string","enum":["semantic-phrase","cpv","expanded-criteria"]}}},"additionalProperties":false,"required":["fit","reasoning","origin"]},"finalScore":{"type":"object","properties":{"score":{"type":"number"},"reasoning":{"type":"string"},"reasoning_short":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["score","reasoning","reasoning_short","warnings"]},"readable_content":{"type":"object","properties":{"readable_title":{"type":"string"},"readable_description":{"type":"string"},"eligibility_criteria":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["readable_title","readable_description","eligibility_criteria"]},"searchIntentContributions":{"type":"array","items":{"type":"object","properties":{"searchIntentId":{"type":"string"},"score":{"type":"number"},"tenderPhrase":{"type":"string"}},"additionalProperties":false,"required":["searchIntentId","score","tenderPhrase"]}},"match_published_at":{"type":"string"},"created_at":{"type":"string"},"runId":{"type":"string"},"searchProfileId":{"type":"string"}},"additionalProperties":false,"required":["id","tender_id","company_id","created_at"]}},"count":{"type":"number"},"total":{"type":"number"}},"additionalProperties":false,"required":["runId","searchProfileId","status","isFinalStatus","matchScores","count","total"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["savedSearch"],"description":"Lists the matches produced by a saved-search run. Poll this endpoint until isFinalStatus is true, then page with offset while offset + count < total.","parameters":[{"name":"savedSearchId","in":"path","required":true,"schema":{"type":"string"}},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fit","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"listSavedSearchRunMatches"}},"/api/v1/tenders/{tenderId}":{"get":{"summary":"Get tender (lot) details","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tender":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"description_regenerated":{"type":"string"},"cpv_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false,"required":["code","description"]}},"submission_date":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"language":{"type":"array","items":{"type":"string"}},"estimated_value":{"type":"number"},"estimated_value_eur":{"type":"number"},"estimated_currency":{"type":"string","enum":["EUR","GBP","PLN","CZK","SEK","RON","DKK","NOK","BGN","CHF","HUF","RSD","MKD","MDL","UAH","ISK","HRK","MAD","MXN","USD","CNY","NPR","NAD","TND","CVE","JPY","UZS","RMB","CAD","AUD","ZAR","ARS","BRL","INR","EGP","DZD","CLP","PEN","PKR","GIP","THB","AED","AWG","TZS","RWF","ALL","PAB","COP","JOD","SOS","SGD"]},"contracting_authority_country":{"type":"string","nullable":true},"contracting_authority_name":{"type":"string","nullable":true},"contracting_country_iso":{"type":"string"},"published_at":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"created_at":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"source_tender":{"type":"object","properties":{"id":{"type":"string","nullable":true},"ted_notice_id":{"type":"string","nullable":true},"source_tender_id":{"type":"string","nullable":true},"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"additionalProperties":false,"required":["id","title","cpv_codes","language","contracting_authority_country","contracting_authority_name","source_tender"]}},"additionalProperties":false,"required":["tender"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["tenders"],"description":"Returns the tender (lot) detail for an ai-core tender ID, including CPV codes, value, deadlines, contracting authority, and source tender metadata. A tender ID is a lot ID.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getTenderDetails"}},"/api/v1/tenders/by-source/{sourceTenderId}":{"get":{"summary":"List lots of a notice","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenders":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"description_regenerated":{"type":"string"},"original_title":{"type":"string","nullable":true},"original_description":{"type":"string","nullable":true},"cpv_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false,"required":["code","description"]}},"submission_date":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"language":{"type":"array","items":{"type":"string"}},"estimated_value":{"type":"number"},"estimated_value_eur":{"type":"number"},"estimated_currency":{"type":"string","enum":["EUR","GBP","PLN","CZK","SEK","RON","DKK","NOK","BGN","CHF","HUF","RSD","MKD","MDL","UAH","ISK","HRK","MAD","MXN","USD","CNY","NPR","NAD","TND","CVE","JPY","UZS","RMB","CAD","AUD","ZAR","ARS","BRL","INR","EGP","DZD","CLP","PEN","PKR","GIP","THB","AED","AWG","TZS","RWF","ALL","PAB","COP","JOD","SOS","SGD"]},"contracting_authority_country":{"type":"string","nullable":true},"contracting_country_iso":{"type":"string"},"published_at":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"created_at":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"}]},"source_tender":{"type":"object","properties":{"id":{"type":"string","nullable":true},"ted_notice_id":{"type":"string","nullable":true},"source_tender_id":{"type":"string","nullable":true},"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false,"required":["title"]}},"additionalProperties":false,"required":["id","title","description","original_title","original_description","cpv_codes","language","contracting_authority_country","source_tender"]}}},"additionalProperties":false,"required":["tenders"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["tenders"],"description":"Returns every lot of a source tender (OCDS notice) by its source_tender_id.","parameters":[{"name":"sourceTenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"listTenderLotsBySource"}},"/api/v1/tenders/{tenderId}/look-alike":{"post":{"summary":"Find look-alike tenders","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number"},"match":{"type":"boolean"},"lot_title":{"type":"string"},"lot_description":{"type":"string"},"tender_title":{"type":"string"},"tender_description":{"type":"string"},"source_tender_id":{"type":"string","nullable":true},"submissionDate":{"oneOf":[{"type":"string"},{"type":"string"},{"type":"string"},{"type":"string"}]},"country":{"type":"string"},"urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"}},"additionalProperties":false,"required":["url"]}}},"additionalProperties":false,"required":["id","lot_title","lot_description","urls"]}}},"additionalProperties":false,"required":["results"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["tenders"],"description":"Returns tenders semantically similar to the given tender, ranked by similarity. Results are global tender data, not company-restricted. Set grade=true to also have an LLM mark each result as a look-alike (slower and consumes LLM tokens).","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"criteria":{"type":"object","properties":{"submissionDeadlineAfter":{"type":"string"},"submissionDeadlineBefore":{"type":"string"},"submissionLanguages":{"type":"array","items":{"type":"string","enum":["sq","eu","be","bs","bg","ca","hr","cs","da","nl","en","et","fo","fi","fr","gl","ka","de","el","hu","is","ga","it","lv","lt","lb","mk","mt","no","pl","pt","ro","ru","sr","sk","sl","es","sv","tr","uk","cy"]}},"contractingCountry":{"type":"array","items":{"type":"string","enum":["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB","GF","GP","MQ","ME","YT","RE","MF","GI","AX","PM","GL","BL","SX","AW","CW","WF","PF","NC","TF","AI","BM","IO","VG","KY","FK","MS","PN","SH","GS","TC","AD","LI","MC","SM","VA","JE","GG","CH","MK","NO","JO","RS","IS","MD","BA","UA"]}},"minContractValueEur":{"type":"number"},"maxContractValueEur":{"type":"number"},"publishedAfter":{"type":"string"},"publishedBefore":{"type":"string"},"createdAfter":{"type":"string"},"createdBefore":{"type":"string"},"cpvCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"includeDescendants":{"type":"boolean"}},"additionalProperties":false,"required":["code"]}},"submissionDeadlineAtLeastDays":{"type":"number"},"publishedDaysAgo":{"type":"number"},"skipUnknownValue":{"type":"boolean"},"includeKeywords":{"type":"array","items":{"type":"string"}},"excludeKeywords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"maxResults":{"type":"number"},"onlyActiveTenders":{"type":"boolean"},"excludeSameSource":{"type":"boolean"},"grade":{"type":"boolean"}},"additionalProperties":false}}}},"operationId":"findLookAlikeTenders"}},"/api/v1/notices/{noticeId}":{"get":{"summary":"Get notice details","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tender":{"type":"object","properties":{"notice_id":{"type":"string"},"publication_date":{"type":"string"},"title":{"type":"string"},"tendify_id":{"type":"string"},"contracting_authority":{"type":"object","properties":{"name":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"contact_person":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"nuts_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false,"required":["code","description"]}}},"additionalProperties":false,"required":["name","address","contact_person","email","phone","country","nuts_codes"]},"procedure_type":{"type":"string","nullable":true},"contract_type":{"type":"string","nullable":true},"lot":{"type":"object","properties":{"lot_number":{"type":"number"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"cpv_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}},"additionalProperties":false,"required":["code","description"]}},"estimated_value":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string","nullable":true}},"additionalProperties":false,"required":["amount","currency"]},"insights":{"type":"object","properties":{"title":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"our_take":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"ted_link":{"type":"string","nullable":true},"email_summary":{"type":"string","nullable":true},"unusual_requirements":{"type":"array","items":{"type":"string","nullable":true}}},"additionalProperties":false,"required":["title","summary","our_take","region","deadline","ted_link","email_summary","unusual_requirements"]}},"additionalProperties":false,"required":["lot_number","title","description","cpv_codes","estimated_value"]},"eligibility_criteria":{"type":"object","properties":{"economic_and_financial_standing":{"type":"string","nullable":true},"technical_and_professional_ability":{"type":"string","nullable":true},"legal_grounds_for_exclusion":{"type":"string","nullable":true}},"additionalProperties":false,"required":["economic_and_financial_standing","technical_and_professional_ability","legal_grounds_for_exclusion"]},"submission":{"type":"object","properties":{"deadline":{"type":"string","nullable":true},"submission_language":{"type":"string"},"submission_url":{"type":"string","nullable":true}},"additionalProperties":false,"required":["deadline","submission_language","submission_url"]},"documents":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","nullable":true},"url":{"type":"string","nullable":true}},"additionalProperties":false,"required":["name","url"]}},"additional_information":{"type":"object","properties":{"clarification_deadline":{"type":"string","nullable":true},"questions_email":{"type":"string","nullable":true}},"additionalProperties":false,"required":["clarification_deadline","questions_email"]},"insights":{"type":"object","properties":{"title":{"type":"string","nullable":true},"summary":{"type":"string","nullable":true},"our_take":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"deadline":{"type":"string","nullable":true},"ted_link":{"type":"string","nullable":true},"email_summary":{"type":"string","nullable":true},"unusual_requirements":{"type":"array","items":{"type":"string","nullable":true}}},"additionalProperties":false,"required":["title","summary","our_take","region","deadline","ted_link","email_summary","unusual_requirements"]},"source_notice_id":{"type":"string"},"source_ted_notice_id":{"type":"string"},"source_enriched_notice_id":{"type":"string"},"original_title":{"type":"string","nullable":true},"original_description":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"notice_title":{"type":"string","nullable":true},"notice_description":{"type":"string","nullable":true},"original_notice_title":{"type":"string","nullable":true},"original_notice_description":{"type":"string","nullable":true},"contracting_country_iso":{"type":"string"},"lots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false,"required":["id","title","description"]}}},"additionalProperties":false,"required":["notice_id","publication_date","title","tendify_id","contracting_authority","procedure_type","contract_type","lot","eligibility_criteria","submission","documents","additional_information","insights","original_title","original_description","description","notice_title","notice_description","original_notice_title","original_notice_description","lots"]},"source_tender_id":{"type":"string"}},"additionalProperties":false,"required":["tender","source_tender_id"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["notices"],"description":"Returns notice-level details and all its lots by notice ID. Supports both pipeline notices and the legacy notice database.","parameters":[{"name":"noticeId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getNoticeDetails"}},"/api/v1/documents/{fileId}":{"get":{"summary":"Get document metadata","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"sizeBytes":{"type":"number"},"extension":{"type":"string"},"status":{"type":"string","enum":["new","error","processed"]},"origin":{"type":"string","enum":["company-document","tender-document","tender-document-user-uploaded"]},"tenderId":{"type":"string"},"uploadedFileId":{"type":"string"},"pageCount":{"type":"number"},"contentSummary":{"type":"string"},"sourceLanguage":{"type":"string"},"category":{"type":"string"},"tableOfContents":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"pageRange":{"type":"string"}},"additionalProperties":false,"required":["title","summary","pageRange"]}},"batchSummaries":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"string"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"}},"additionalProperties":false,"required":["id","number"]}}},"additionalProperties":false,"required":["summary","pages"]}}},"additionalProperties":false,"required":["id","filename","sizeBytes","extension","status","origin"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Returns a processed document's metadata, including its table of contents and page-batch summaries.","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getDocument"}},"/api/v1/documents/{fileId}/pages":{"get":{"summary":"Get document pages","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"number"},"content":{"type":"string","nullable":true},"status":{"type":"string","enum":["new","error","processed"]},"uploadedFileId":{"type":"string"},"pageWidth":{"type":"number"},"pageHeight":{"type":"number"},"regions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"number"},"content":{"type":"string"},"bbox_2d":{"type":"array","items":{"type":"number"}}},"additionalProperties":false}}},"additionalProperties":false,"required":["pageNumber","status"]}}},"additionalProperties":false,"required":["pages"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Returns OCR page content and region bounding boxes for a processed document. When both startPage and endPage are provided, only that range is returned.","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startPage","in":"query","required":false,"schema":{"type":"number"}},{"name":"endPage","in":"query","required":false,"schema":{"type":"number"}}],"operationId":"getDocumentPages"}},"/api/v1/documents/{fileId}/headers":{"get":{"summary":"Get document headers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"headers":{"type":"array","items":{"type":"object","properties":{"pageNumber":{"type":"number"},"title":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","nullable":true}},"additionalProperties":false,"required":["pageNumber","title","label","category"]}}},"additionalProperties":false,"required":["headers"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false,"required":["message"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Returns the page-level titles and headers extracted from a processed document's OCR content.","parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getDocumentHeaders"}},"/api/v1/tenders/{tenderId}/documents/download":{"post":{"summary":"Trigger document download","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenderDocumentId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"scheduled":{"type":"boolean"}},"additionalProperties":false,"required":["tenderDocumentId","status","message","scheduled"]}},"additionalProperties":false,"required":["data"]}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tenderDocumentId":{"type":"string"},"status":{"type":"string"},"message":{"type":"string"},"scheduled":{"type":"boolean"}},"additionalProperties":false,"required":["tenderDocumentId","status","message","scheduled"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Triggers the download of a tender's documents. Returns 202 when a download workflow was scheduled, 200 when a download is already in progress or no downloadable files were found. Safe to call repeatedly while a download is running.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"triggerDocumentDownload"}},"/api/v1/tenders/{tenderId}/analyze":{"post":{"summary":"Start document analysis","responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workflowId":{"type":"string"},"status":{"type":"undefined","enum":[null]}},"additionalProperties":false,"required":["workflowId","status"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Starts an asynchronous document-research analysis of a tender. Requires downloaded and processed documents; otherwise returns 409. Poll GET /analyses/:workflowId for the result.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"string"}}},"additionalProperties":false,"required":["questions"]}}}},"operationId":"startDocumentAnalysis"}},"/api/v1/analyses/{workflowId}":{"get":{"summary":"Get analysis result","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","retry","aborted","waiting"]},"isFinalStatus":{"type":"boolean"},"isStatusSuccess":{"type":"boolean"},"answers":{"type":"array","items":{"type":"object","properties":{"questionId":{"type":"string"},"answer":{"type":"string"},"references":{"type":"array","items":{"type":"object","properties":{"idx":{"type":"number"},"fileId":{"type":"string"},"pageNumber":{"type":"number"},"regionIndex":{"type":"number"},"uploadedFileId":{"type":"string"},"filename":{"type":"string"}},"additionalProperties":false,"required":["idx","fileId","pageNumber","regionIndex"]}}},"additionalProperties":false,"required":["questionId","answer","references"]}},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"totalTokens":{"type":"number"}},"additionalProperties":false,"required":["inputTokens","outputTokens","totalTokens"]},"error":{"type":"string"}},"additionalProperties":false,"required":["id","status","isFinalStatus"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["documents"],"description":"Returns the status and, once finished, the answers of a document-research analysis. Returns 404 for workflows of another company or a different workflow type.","parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getDocumentAnalysis"}},"/api/v1/tenders/{tenderId}/api-comments":{"post":{"summary":"Post an API-authored comment","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"}},"additionalProperties":false,"required":["id","timestamp"]}},"additionalProperties":false,"required":["data"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"502":{"description":"HTTP 502","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}},"503":{"description":"HTTP 503","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["comments"],"description":"Posts a comment authored by the API integration on a tender in the API key company's pipeline. The comment is labelled \"API\" in the tender thread, and the team is notified the same way as for a teammate comment. Plain text only: no citations, no @-mentions, no markdown. Not idempotent: a retry can create a second comment.","parameters":[{"name":"tenderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"parentCommentId":{"type":"string","nullable":true}},"additionalProperties":false,"required":["content"]}}}},"operationId":"postTenderApiComment"}},"/api/v1/status":{"get":{"summary":"Get API status","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"timestamp":{"type":"string"}},"additionalProperties":false,"required":["status","timestamp"]}},"additionalProperties":false,"required":["data"]}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string","enum":["body","query","param","general"]},"message":{"type":"string"}},"additionalProperties":false,"required":["field","type","message"]},"nullable":true}},"additionalProperties":false,"required":["error"]}}}},"429":{"description":"Rate limit exceeded. Read the x-rate-limit-* headers for the remaining quota and reset time.","headers":{"Retry-After":{"description":"Seconds until the request may be retried.","schema":{"type":"integer"}},"x-rate-limit-second-limit":{"schema":{"type":"integer"}},"x-rate-limit-second-remaining":{"schema":{"type":"integer"}},"x-rate-limit-second-reset":{"description":"Unix epoch second at which the second window resets.","schema":{"type":"integer"}},"x-rate-limit-minute-limit":{"schema":{"type":"integer"}},"x-rate-limit-minute-remaining":{"schema":{"type":"integer"}},"x-rate-limit-minute-reset":{"description":"Unix epoch second at which the minute window resets.","schema":{"type":"integer"}},"x-rate-limit-hour-limit":{"schema":{"type":"integer"}},"x-rate-limit-hour-remaining":{"schema":{"type":"integer"}},"x-rate-limit-hour-reset":{"description":"Unix epoch second at which the hour window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{}},"additionalProperties":false,"required":["error"]}},"additionalProperties":false,"required":["data"]}}}}},"tags":["status"],"description":"Returns API status and timestamp. This endpoint is public and does not require an API key.","operationId":"getApiStatus","security":[]}}},"servers":[{"url":"https://api.kosmobids.com"}],"tags":[{"name":"pipeline","description":"The company pipeline read model and its write endpoints: stage moves, tags, archive/restore, and tender document upload. Requires a company-scoped API key. Every pipeline write is attributed to the API key in the tender activity feed. Pagination is cursor-based. See [Updating the pipeline](/docs/concepts/updating-the-pipeline) and [Pipeline and pagination](/docs/concepts/pipeline-and-pagination).","x-displayName":"Pipeline"},{"name":"search","description":"Ad-hoc semantic search across the tender corpus. Results are tender IDs with relevance signals; hydrate them with the tender endpoints. Requires a company-scoped API key. See [Matching, scores, and fit](/docs/concepts/matching-and-fit).","x-displayName":"Search"},{"name":"savedSearch","description":"Persistent search definitions, asynchronous matching runs, and run results (preview or published). Requires a company-scoped API key. See [Saved searches and runs](/docs/concepts/saved-searches-and-runs).","x-displayName":"Saved searches"},{"name":"tenders","description":"Global tender (lot) data: detail, all lots of a notice, and semantic look-alike discovery. These endpoints read global procurement data and do not require a company scope. See [Tender, lot, notice, and file IDs](/docs/concepts/ids-and-entities).","x-displayName":"Tenders"},{"name":"notices","description":"Notice-level data with all of its lots. These endpoints read global procurement data and do not require a company scope. See [Tender, lot, notice, and file IDs](/docs/concepts/ids-and-entities).","x-displayName":"Notices"},{"name":"documents","description":"Tender file download, OCR content, and asynchronous document analysis. Requires a company-scoped API key. See [Documents and OCR](/docs/concepts/documents-and-ocr) and [Document analysis](/docs/concepts/document-analysis).","x-displayName":"Documents"},{"name":"comments","description":"Write comments authored by the API integration on a company tender. Posts are labelled \"API\" in the tender thread and notify the team. Requires a company-scoped API key. See [Comments](/docs/concepts/comments).","x-displayName":"Comments"},{"name":"status","description":"Public availability check for the public API. No API key is required. See [Errors and limits](/docs/concepts/errors-and-limits).","x-displayName":"Status"}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"security":[{"HeaderAuth":[]}],"x-tagGroups":[{"name":"Overview","tags":["pipeline","status"]},{"name":"Search","tags":["search","savedSearch"]},{"name":"Tenders","tags":["tenders","notices"]},{"name":"Documents","tags":["documents"]},{"name":"Collaboration","tags":["comments"]}]}