{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lumethic-com/json-schema/lumethic-com-verification-request-response-schema.json",
  "title": "VerificationRequestResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lumethic-com-openapi.json#/components/schemas/VerificationRequestResponse",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "subject": {
      "type": "string",
      "title": "Subject"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instructions"
    },
    "mode": {
      "$ref": "#/$defs/RequestMode"
    },
    "status": {
      "$ref": "#/$defs/RequestStatus",
      "description": "Derived: 'expired' is 'open' past expires_at."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Expires At"
    },
    "closed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Closed At"
    },
    "max_submissions": {
      "type": "integer",
      "title": "Max Submissions"
    },
    "submission_count": {
      "type": "integer",
      "title": "Submission Count",
      "description": "Accepted uploads so far (counted, never stored)."
    },
    "share_with_provider": {
      "type": "boolean",
      "title": "Share With Provider"
    },
    "token": {
      "type": "string",
      "title": "Token",
      "description": "Bearer secret: anyone holding it can open the landing page and upload to this request until it closes, expires or fills. Returned on every owner read; listing requests exposes every open link of the account."
    },
    "url": {
      "type": "string",
      "title": "Url",
      "description": "The landing page link (and the QR code's content): {FRONTEND_URL}/r/{token}."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "subject",
    "instructions",
    "mode",
    "status",
    "expires_at",
    "closed_at",
    "max_submissions",
    "submission_count",
    "share_with_provider",
    "token",
    "url",
    "created_at",
    "updated_at"
  ],
  "$defs": {
    "RequestMode": {
      "type": "string",
      "enum": [
        "existing_original",
        "capture"
      ],
      "title": "RequestMode",
      "description": "How the provider answers a request: an uploaded camera original, or a capture with Lumethic Capture."
    },
    "RequestStatus": {
      "type": "string",
      "enum": [
        "open",
        "closed",
        "expired"
      ],
      "title": "RequestStatus",
      "description": "Derived status of a verification request.\n\n``open`` and ``closed`` are stored; ``expired`` is ``open`` past ``expires_at``\nand is never written to the row."
    }
  }
}