{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dealroom/json-schema/dealroom-valuation-detail-response-schema.json",
  "title": "ValuationDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dealroom-valuations-api-openapi.yml#/components/schemas/ValuationDetailResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/Valuation"
    },
    "currency": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "currency"
  ],
  "$defs": {
    "EntityRef": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "Stable UUID of the entity."
        },
        "type": {
          "$ref": "#/$defs/EntityType"
        },
        "subtype": {
          "anyOf": [
            {
              "$ref": "#/$defs/OrganizationSubtype"
            },
            {
              "type": "null"
            }
          ],
          "description": "Organization subtype; always null for a person."
        },
        "name": {
          "type": "string",
          "description": "Display name."
        },
        "image": {
          "type": [
            "string",
            "null"
          ],
          "description": "Absolute image URL; null when none."
        },
        "dealroom_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Canonical profile URL on app.dealroom.co."
        }
      },
      "required": [
        "uuid",
        "type",
        "subtype",
        "name",
        "image",
        "dealroom_url"
      ],
      "description": "The identity of an entity embedded in another entity's response. Closed: richer detail lives on the sub-resource, where tier redaction can reach it."
    },
    "EntityType": {
      "type": "string",
      "enum": [
        "organization",
        "person"
      ],
      "description": "Top-level entity type: `organization` or `person`."
    },
    "OrganizationSubtype": {
      "type": "string",
      "enum": [
        "company",
        "university",
        "gov_ngo",
        "investor"
      ],
      "description": "The kind of organization: company, university, gov_ngo or investor."
    },
    "PartialDate": {
      "type": "string",
      "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$",
      "description": "A date at the precision the source knows it. The value's length is its precision: `YYYY` when only the year is known, `YYYY-MM` for the month, `YYYY-MM-DD` for the day. Never padded: an unknown month or day shortens the value rather than defaulting to `01`. Deliberately not `format: date`, which requires a full day."
    },
    "Valuation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Stable Dealroom valuation id."
        },
        "value": {
          "type": [
            "number",
            "null"
          ],
          "description": "Valuation amount, in the response `currency` (default USD). Null when the source amount is unknown."
        },
        "valued_date": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartialDate"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the valuation applies, at source precision."
        },
        "is_estimate": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the value is a Dealroom estimate rather than a reported figure."
        },
        "entity": {
          "$ref": "#/$defs/EntityRef"
        },
        "deleted_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "ISO 8601 timestamp when this record was soft-deleted (null = active)"
        }
      },
      "required": [
        "id",
        "value",
        "valued_date",
        "is_estimate",
        "entity",
        "deleted_at"
      ]
    }
  }
}