{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infinihash-com/json-schema/infinihash-com-policy-decision-list-schema.json",
  "title": "PolicyDecisionList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infinihash-com-policy-api-openapi.yml#/components/schemas/PolicyDecisionList",
  "type": "object",
  "required": [
    "count",
    "decisions"
  ],
  "properties": {
    "count": {
      "type": "integer"
    },
    "decisions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PolicyDecisionRecord"
      }
    }
  },
  "$defs": {
    "PolicyDecisionRecord": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "apiKeyId": {
          "type": "string"
        },
        "submissionId": {
          "type": [
            "string",
            "null"
          ]
        },
        "rulesetVersion": {
          "type": "integer"
        },
        "input": {
          "type": "string",
          "description": "JSON-encoded request facts (truncated to 4000 chars)."
        },
        "outcome": {
          "$ref": "#/$defs/PolicyOutcome"
        },
        "reasonCode": {
          "type": "string"
        },
        "matchedRule": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "PolicyOutcome": {
      "type": "string",
      "enum": [
        "none",
        "sms_confirmation",
        "dl_number",
        "dl_image",
        "liveness",
        "full_idv"
      ],
      "description": "Verification step required. Ordered from least to most restrictive."
    }
  }
}