{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tender-agents-com/json-schema/tender-agents-com-company-tender-match-out-schema.json",
  "title": "CompanyTenderMatchOut",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tender-agents-com-agentleads-openapi.json#/components/schemas/CompanyTenderMatchOut",
  "properties": {
    "tender": {
      "$ref": "#/$defs/PublicTenderOut"
    },
    "match_score": {
      "type": "integer",
      "title": "Match Score"
    },
    "technical_score": {
      "type": "integer",
      "title": "Technical Score",
      "default": 0
    },
    "geography_tier": {
      "type": "string",
      "title": "Geography Tier",
      "default": "review"
    },
    "geography_label": {
      "type": "string",
      "title": "Geography Label",
      "default": "Prüfen · Leistungsort fehlt"
    },
    "distance_km": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Distance Km"
    },
    "reasons": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Reasons"
    },
    "score_components": {
      "additionalProperties": {
        "type": "integer"
      },
      "type": "object",
      "title": "Score Components"
    },
    "status": {
      "type": "string",
      "title": "Status",
      "default": "new"
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note"
    },
    "reference_project": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reference Project"
    },
    "next_action": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Action"
    },
    "go_no_go": {
      "anyOf": [
        {
          "$ref": "#/$defs/GoNoGoCardOut"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "tender",
    "match_score"
  ],
  "$defs": {
    "GoNoGoCardOut": {
      "properties": {
        "rating_color": {
          "type": "string",
          "enum": [
            "green",
            "yellow",
            "red"
          ],
          "title": "Rating Color"
        },
        "rating_label": {
          "type": "string",
          "title": "Rating Label"
        },
        "rating_summary": {
          "type": "string",
          "title": "Rating Summary"
        },
        "recommendation": {
          "type": "string",
          "title": "Recommendation"
        },
        "decision_rules": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Decision Rules"
        },
        "technical_requirements": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Technical Requirements"
        },
        "eligibility_evidence": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Eligibility Evidence"
        },
        "award_criteria": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Award Criteria"
        },
        "reference_fit": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Reference Fit"
        },
        "deadline_status": {
          "type": "string",
          "title": "Deadline Status"
        },
        "value_status": {
          "type": "string",
          "title": "Value Status"
        },
        "buyer_cluster": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Cluster"
        },
        "early_signals": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Early Signals"
        },
        "open_questions": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Open Questions"
        },
        "suggested_next_action": {
          "type": "string",
          "title": "Suggested Next Action"
        }
      },
      "type": "object",
      "required": [
        "rating_color",
        "rating_label",
        "rating_summary",
        "recommendation",
        "deadline_status",
        "value_status",
        "suggested_next_action"
      ],
      "title": "GoNoGoCardOut"
    },
    "PublicTenderOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "source": {
          "type": "string",
          "title": "Source"
        },
        "source_url": {
          "type": "string",
          "title": "Source Url"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "buyer_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Name"
        },
        "buyer_country": {
          "type": "string",
          "title": "Buyer Country"
        },
        "buyer_nuts": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Buyer Nuts"
        },
        "performance_location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Performance Location"
        },
        "performance_nuts": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Performance Nuts"
        },
        "cpv_main": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cpv Main"
        },
        "cpv_additional": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Cpv Additional"
        },
        "published_at": {
          "type": "string",
          "format": "date-time",
          "title": "Published At"
        },
        "deadline_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deadline At"
        },
        "deadline_details": {
          "items": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "array",
          "title": "Deadline Details"
        },
        "requirements": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Requirements"
        },
        "document_revision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Document Revision"
        },
        "document_count": {
          "type": "integer",
          "title": "Document Count",
          "default": 0
        },
        "estimated_value_eur": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimated Value Eur"
        },
        "languages": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Languages"
        },
        "lot_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lot Count"
        },
        "award_criteria": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array",
          "title": "Award Criteria"
        },
        "framework_agreement": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Framework Agreement"
        },
        "gpa_covered": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Gpa Covered"
        },
        "verticals": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Verticals"
        },
        "relevance_score": {
          "type": "integer",
          "title": "Relevance Score"
        },
        "summary": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Summary"
        }
      },
      "type": "object",
      "required": [
        "id",
        "source",
        "source_url",
        "title",
        "buyer_country",
        "published_at",
        "relevance_score"
      ],
      "title": "PublicTenderOut"
    }
  }
}