{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sourcetier/json-schema/sourcetier-statement-version-schema.json",
  "title": "StatementVersion",
  "description": "One version of a statement. confidence_recorded is the confidence stored when the version was written.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sourcetier-openapi.json#/components/schemas/StatementVersion",
  "type": "object",
  "required": [
    "claim_id",
    "verification_state",
    "recorded_at",
    "sources"
  ],
  "properties": {
    "statement_id": {
      "type": "string"
    },
    "claim_id": {
      "type": "string"
    },
    "value": {},
    "unit": {
      "type": [
        "string",
        "null"
      ]
    },
    "verification_state": {
      "type": "string",
      "enum": [
        "verified",
        "corroborated",
        "vendor_stated",
        "customer_reported",
        "estimated",
        "unknown"
      ]
    },
    "confidence_recorded": {
      "type": [
        "number",
        "null"
      ]
    },
    "observed_on": {
      "type": [
        "string",
        "null"
      ]
    },
    "recorded_at": {
      "type": "string",
      "format": "date-time"
    },
    "ended_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "ended_by": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "superseded",
        "withdrawn",
        null
      ]
    },
    "ended_later": {
      "type": [
        "string",
        "null"
      ]
    },
    "withdrawal_reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "excerpt": {
      "type": [
        "string",
        "null"
      ]
    },
    "sources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Source"
      }
    }
  },
  "additionalProperties": true,
  "$defs": {
    "Source": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "tier": {
          "type": [
            "integer",
            "null"
          ],
          "description": "1 is best."
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "retrieved_on": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "role": {
          "type": "string",
          "enum": [
            "evidence",
            "checked_without_finding"
          ]
        }
      },
      "additionalProperties": true
    }
  }
}