{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/statcite-com/json-schema/statcite-com-verify-result-schema.json",
  "title": "VerifyResult",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/statcite-com-openapi.json#/components/schemas/VerifyResult",
  "type": "object",
  "properties": {
    "verdict": {
      "type": "string",
      "enum": [
        "match",
        "close",
        "mismatch",
        "cannot_verify"
      ]
    },
    "claimed_value": {
      "type": "number"
    },
    "official_value": {
      "type": [
        "number",
        "null"
      ]
    },
    "is_projection": {
      "type": "boolean",
      "description": "True when the matched official observation is an IMF WEO/Fiscal Monitor estimate/projection, or a period the ECCB shades as future data, not a final outturn. Kept for compatibility; observation_status carries the finer-grained classification."
    },
    "observation_status": {
      "type": "string",
      "enum": [
        "actual",
        "modeled_estimate",
        "estimate_or_actual",
        "projection",
        "unknown"
      ],
      "description": "The honest status of the matched observation, as one of five values. 'actual' means a series StatCite classifies as outturn data (registry World Bank indicators not flagged as modelled, and explicit worldbank/ WDI ids), subject to routine revision. 'modeled_estimate' (added 1.4.1) means the registry flags the indicator as a modelled series, such as the World Bank's ILO-modelled unemployment and labour force participation estimates. That is a published figure, but a model output rather than a measured outturn. 'estimate_or_actual' means an IMF WEO/Fiscal Monitor observation before the projection boundary. The IMF's true latest-actual year varies by country and is not exposed by the data path, so recent values may be staff estimates, and this should never be read as a confirmed actual. 'projection' means at or after the heuristic boundary, or a period the ECCB shades as future data, which carries status_method as_published. 'unknown' means no observation matched the period, or the series is an explicit id outside StatCite's classification. Arbitrary DBnomics series can be forecast datasets, so consult the source."
    },
    "status_method": {
      "type": "string",
      "enum": [
        "horizon_heuristic",
        "as_published"
      ],
      "description": "How observation_status was determined. 'horizon_heuristic' applies to IMF WEO/Fiscal Monitor series, where the boundary is derived from the response's own data: the payload's projection horizon on the DataMapper channel, and the dataset-code vintage year on the DBnomics channel. It is a heuristic, not IMF per-country metadata. 'as_published' applies otherwise."
    },
    "period": {
      "type": "string"
    },
    "difference": {
      "type": [
        "number",
        "null"
      ]
    },
    "relative_difference_pct": {
      "type": [
        "number",
        "null"
      ]
    },
    "explanation": {
      "type": "string"
    },
    "diagnostics": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "series": {
      "type": "object"
    },
    "country": {
      "type": "object"
    },
    "citation": {
      "$ref": "#/$defs/Citation"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "fallback_used": {
      "type": "boolean",
      "description": "Present and true when the official value came from a fallback source because the primary failed. A transient primary failure demotes the verdict to cannot_verify with the fallback value reported as indicative (a substitute source can differ by definition or vintage far beyond the verdict bands, and the primary may recover and serve a different number); when the primary permanently lacks the series/country, the fallback is the stable serving source and the verdict is judged normally with disclosure. Absent otherwise."
    },
    "as_of": {
      "type": "object",
      "description": "Present only when the as_of parameter was used, and absent otherwise. It marks historical IMF-VINTAGE verification: the verdict was checked against a dated IMF WEO edition, not today's live data.",
      "properties": {
        "requested": {
          "type": "string",
          "description": "The as_of date as passed by the caller."
        },
        "resolved_vintage": {
          "type": "string",
          "description": "The IMF WEO edition (YYYY-MM) resolved from it."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "conservative_month_calendar"
          ],
          "description": "How the vintage was resolved: with a conservative month calendar (editions flip on 1 May and 1 November), NOT the IMF's exact release days. So a date late in a release month resolves to the previous edition even if the new one had already been published. A note discloses this for dates inside release months."
        },
        "verification_scope": {
          "type": "string",
          "enum": [
            "imf_weo_historical_vintage"
          ],
          "description": "What was verified against: the IMF WEO historical archive, the only dated-vintage source this server has."
        },
        "normal_primary_source": {
          "type": "string",
          "description": "The source the live (non-as_of) path serves this indicator from first (e.g. 'World Bank WDI', 'IMF Fiscal Monitor (via the DataMapper API)')."
        },
        "source_changed_for_as_of": {
          "type": "boolean",
          "description": "True when the live primary differs from the WEO archive by source or IMF database. A claim originally made from the live primary can then legitimately differ from the WEO edition for methodological reasons, not only because of revisions."
        }
      }
    }
  },
  "$defs": {
    "Citation": {
      "type": "object",
      "description": "Every numeric payload carries one of these. Reproduce citation_text when presenting the number.",
      "properties": {
        "source": {
          "type": "string"
        },
        "dataset": {
          "type": "string"
        },
        "series_id": {
          "type": "string"
        },
        "series_name": {
          "type": "string"
        },
        "source_url": {
          "type": "string"
        },
        "api_url": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "attribution": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        },
        "citation_text": {
          "type": "string"
        },
        "notices": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "export_formats": {
          "type": "object",
          "description": "Ready-to-paste citation strings derived from this citation's own fields, so they can never disagree with citation_text.",
          "properties": {
            "bibtex": {
              "type": "string"
            },
            "apa": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}