{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-process-token-dto-schema.json",
  "title": "ProcessTokenDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-process-tokens-api-openapi.yml#/components/schemas/ProcessTokenDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "processDefnId": {
      "type": "string",
      "description": "Process definition ID that token is created for."
    },
    "processDefnName": {
      "type": "string",
      "description": "Process definition name that token is created for. This field is populated only if tag is created based on process definition name and version."
    },
    "processDefnVersion": {
      "type": "integer",
      "format": "int32",
      "description": "Process definition version that token is created for. This field is populated only if tag is created based on process definition name and version."
    },
    "processDefnTag": {
      "type": "string",
      "description": "Process definition tag that token is created for. This field is populated only if tag is created based on process definition tag itself."
    },
    "uiUrl": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "UNLIMITED",
        "MULTI_USE_COUNT_LIMITED",
        "MULTI_USE_TIME_LIMITED"
      ]
    },
    "notBeforeDtm": {
      "type": "string",
      "format": "date-time"
    },
    "notAfterDtm": {
      "type": "string",
      "format": "date-time"
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string"
    },
    "lastUpdatedBy": {
      "type": "string"
    },
    "maxCount": {
      "type": "integer",
      "format": "int32"
    },
    "counter": {
      "type": "integer",
      "format": "int32"
    },
    "maxProcessDuration": {
      "type": "string",
      "deprecated": true,
      "description": "This field is deprecated and will be removed in future versions. Deprecated since Aug 2025."
    },
    "parameters": {
      "type": "object",
      "additionalProperties": {}
    },
    "processInstanceInit": {
      "$ref": "#/$defs/CreateProcessInstanceDto"
    }
  },
  "$defs": {
    "CreateProcessInstanceDto": {
      "type": "object",
      "properties": {
        "externalSources": {
          "$ref": "#/$defs/ExternalSources"
        }
      }
    },
    "DocumentUpload": {
      "type": "object",
      "properties": {
        "documentFormat": {
          "type": "string",
          "description": "Document Format",
          "enum": [
            "PDF"
          ],
          "minLength": 1,
          "readOnly": true
        },
        "documentCaptureKey": {
          "type": "string",
          "description": "The document capture key",
          "readOnly": true
        },
        "pageCaptureKey": {
          "type": "string",
          "description": "The document page capture key",
          "readOnly": true
        },
        "uploadUrl": {
          "type": "string",
          "description": "The location to which the document should be uploaded",
          "readOnly": true
        },
        "uploadHeaders": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The upload headers that must be set when uploading the document",
          "readOnly": true
        }
      },
      "required": [
        "documentFormat"
      ]
    },
    "ExternalSources": {
      "type": "object",
      "properties": {
        "faceUploads": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Upload"
          },
          "description": "External Face Uploads. This is a map based on a face key and the upload.",
          "readOnly": true
        },
        "documentUploads": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/DocumentUpload"
          },
          "description": "External Document Uploads. This is a map based on a doc key and the upload.",
          "readOnly": true
        }
      }
    },
    "Upload": {
      "type": "object",
      "properties": {
        "imageFormat": {
          "type": "string",
          "description": "Image Format",
          "enum": [
            "JPEG"
          ],
          "minLength": 1,
          "readOnly": true
        },
        "captureKey": {
          "type": "string",
          "description": "The image capture key",
          "readOnly": true
        },
        "uploadUrl": {
          "type": "string",
          "description": "The location to which the face image should be uploaded",
          "readOnly": true
        },
        "uploadHeaders": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The upload headers that must be set when uploading the images",
          "readOnly": true
        }
      },
      "required": [
        "imageFormat"
      ]
    }
  }
}