{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-process-instance-full-details-dto-schema.json",
  "title": "ProcessInstanceFullDetailsDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-process-instances-api-openapi.yml#/components/schemas/ProcessInstanceFullDetailsDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "processDefnId": {
      "type": "string"
    },
    "processDefnName": {
      "type": "string"
    },
    "processDefnVersion": {
      "type": "integer",
      "format": "int32"
    },
    "processTokenId": {
      "type": "string"
    },
    "processTokenCounter": {
      "type": "integer",
      "format": "int32"
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "ACTIVE",
        "COMPLETED_TERMINATED",
        "COMPLETED_ENDED_ERROR",
        "COMPLETED_ENDED_SUCCESS",
        "REVIEW",
        "PAUSED",
        "COMPLETED_PROCESS_ERROR"
      ]
    },
    "processServerId": {
      "type": "string"
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "expiringDtm": {
      "type": "string",
      "format": "date-time"
    },
    "completedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "extId": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "firstName": {
      "type": "string"
    },
    "dateOfBirth": {
      "type": "string",
      "format": "date"
    },
    "phoneNumber": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "nationality": {
      "type": "string"
    },
    "results": {
      "type": "object",
      "additionalProperties": {}
    },
    "externalSources": {
      "$ref": "#/$defs/ExternalSources"
    },
    "processDefnS3Bucket": {
      "type": "string"
    },
    "processDefnS3Dir": {
      "type": "string"
    },
    "processTokenParameters": {
      "type": "object",
      "additionalProperties": {}
    },
    "initParameters": {
      "type": "object",
      "additionalProperties": {}
    },
    "processDefinitionType": {
      "type": "string",
      "enum": [
        "AUTHENTICATION",
        "VERIFICATION",
        "OTHER"
      ]
    },
    "themeUrl": {
      "type": "string"
    },
    "retentionDays": {
      "type": "integer",
      "format": "int32"
    },
    "archives": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProcessInstanceArchiveSummaryDto"
      }
    }
  },
  "$defs": {
    "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
        }
      }
    },
    "ProcessInstanceArchiveSummaryDto": {
      "type": "object",
      "properties": {
        "statusCode": {
          "type": "string",
          "description": "Current archive status: QUEUED, PENDING, COMPLETED, FAILED or RETRYING."
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time, in UTC, when this archive record was last updated."
        },
        "policyName": {
          "type": "string",
          "description": "Name of the archive policy that produced this archive."
        },
        "policyVersion": {
          "type": "integer",
          "format": "int32",
          "description": "Version of the archive policy that produced this archive."
        },
        "policyId": {
          "type": "string",
          "description": "Identifier of the archive policy that produced this archive."
        },
        "location": {
          "type": "string",
          "description": "Relative storage location of the written archive. Populated only once the archive has been successfully written (status COMPLETED)."
        }
      },
      "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"
      ]
    }
  }
}