{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/streetproof-com/json-schema/streetproof-com-observation-schema.json",
  "title": "Observation",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/streetproof-com-openapi.json#/components/schemas/Observation",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "asset_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "source_type": {
      "type": "string",
      "enum": [
        "fleet_cam",
        "scout",
        "telematics_api",
        "seed_survey",
        "reviewed_sensor_source"
      ]
    },
    "observed_at": {
      "type": "string",
      "format": "date-time"
    },
    "accepted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When StreetProof admitted the citation after evidence review."
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the accepted citation became public."
    },
    "reprocessed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "derived_from_archive": {
      "type": "boolean",
      "description": "True when a later recognition pass derived this citation from an eligible privacy-scrubbed archive capture."
    },
    "recognition_model_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "methodology_version": {
      "type": "string"
    },
    "h3_cell": {
      "type": "string"
    },
    "observation_verification_state": {
      "type": "string",
      "enum": [
        "provisional",
        "corroborated",
        "verified",
        "rejected"
      ],
      "description": "Formal verification state of this observation."
    },
    "verif_state": {
      "type": "string",
      "enum": [
        "provisional",
        "corroborated",
        "verified",
        "rejected"
      ],
      "deprecated": true,
      "description": "Deprecated 2026-07-29; remove after 2026-10-27. Use observation_verification_state."
    },
    "city": {
      "type": [
        "string",
        "null"
      ],
      "description": "Privacy-safe city label for this observation."
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "description": "Province, state, or region for this observation."
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2 country code."
    },
    "presence_kind": {
      "type": "string",
      "enum": [
        "location_presence",
        "mobile_presence",
        "brand_mention"
      ],
      "description": "What the citation proves. brand_mention never implies an operating address."
    },
    "physical_citation": {
      "type": "boolean",
      "const": true
    },
    "ledger_schema_version": {
      "type": "integer",
      "enum": [
        1,
        2
      ]
    },
    "trust_weight": {
      "type": "number"
    },
    "ledger_hash": {
      "type": "string",
      "description": "Hex; included in signed ledger checkpoints published on /transparency"
    }
  }
}