{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tenderlead-co-uk/json-schema/tenderlead-co-uk-daily-brief-schema.json",
  "title": "DailyBrief",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tenderlead-co-uk-openapi.json#/components/schemas/DailyBrief",
  "type": "object",
  "required": [
    "generated_at",
    "tier",
    "opportunities"
  ],
  "properties": {
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Response time, not evidence that source notices were refreshed."
    },
    "tier": {
      "type": "string",
      "enum": [
        "starter",
        "pro",
        "team"
      ],
      "description": "Effective account entitlement. Pro/Team return account-matched recommendations; legacy Starter returns public-feed fields."
    },
    "opportunities": {
      "type": "array",
      "description": "May be empty. For ordinary matched accounts, includes scores from the previous 24 hours. Missing source or assessment fields remain absent or null; inspect the original notice before acting.",
      "items": {
        "type": "object",
        "properties": {
          "contract_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stable identifier for destination deduplication when supplied."
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "buyer": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_value": {
            "type": [
              "number",
              "string",
              "null"
            ],
            "description": "Stored normalised estimate, which may include an inferred VAT adjustment. Prefer published_value for source amounts and VAT basis. Missing is not zero."
          },
          "published_value": {
            "type": [
              "object",
              "null"
            ],
            "description": "Source-published net/gross amounts only, without an assumed VAT rate. A conflict requires checking the notice.",
            "properties": {
              "net": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "gross": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "basis": {
                "type": "string",
                "enum": [
                  "net",
                  "gross",
                  "unstated"
                ],
                "description": "VAT basis: amount-only sources are unstated unless the source defines a net amount."
              },
              "conflict": {
                "type": "boolean"
              }
            }
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "deadline": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source deadline where supplied. Missing does not mean open-ended."
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "description": "Account qualification signal when available, not a winning probability."
          },
          "recommendation": {
            "type": [
              "string",
              "null"
            ]
          },
          "tender_summary": {
            "type": [
              "string",
              "object",
              "null"
            ],
            "description": "May be plain text or labelled sections."
          }
        },
        "additionalProperties": true
      }
    }
  }
}