{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infinihash-com/json-schema/infinihash-com-consent-status-schema.json",
  "title": "ConsentStatus",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infinihash-com-liveness-biometrics-api-openapi.yml#/components/schemas/ConsentStatus",
  "type": "object",
  "required": [
    "submissionId",
    "hasConsent",
    "records"
  ],
  "properties": {
    "submissionId": {
      "type": "string"
    },
    "hasConsent": {
      "type": "boolean",
      "description": "true only if the PRIMARY subject (subjectRef == submission id) has consented; UBO consent rows do not count."
    },
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "purpose",
          "policyVersion",
          "method",
          "createdAt",
          "subject"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "policyVersion": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "subject": {
            "type": "string",
            "enum": [
              "primary",
              "other"
            ]
          }
        }
      }
    }
  }
}