{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docupanda/json-schema/docupanda-workflow-v2-run-response-schema.json",
  "title": "WorkflowV2RunResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docupanda-workflow-api-openapi.yml#/components/schemas/WorkflowV2RunResponse",
  "properties": {
    "workflowId": {
      "type": "string",
      "title": "Workflowid",
      "description": "Workflow that was run."
    },
    "jobId": {
      "type": "string",
      "title": "Jobid",
      "description": "WorkflowV2Job id for this run. Poll GET /job/{job_id}."
    },
    "status": {
      "$ref": "#/$defs/ProcessingStatus",
      "description": "Overall run status."
    },
    "inputs": {
      "items": {
        "$ref": "#/$defs/WorkflowV2RunInputResult"
      },
      "type": "array",
      "title": "Inputs",
      "description": "Per-input resolution."
    }
  },
  "type": "object",
  "required": [
    "workflowId",
    "jobId",
    "status",
    "inputs"
  ],
  "$defs": {
    "ProcessingStatus": {
      "type": "string",
      "enum": [
        "processing",
        "completed",
        "error"
      ],
      "title": "ProcessingStatus"
    },
    "WorkflowV2RunInputResult": {
      "properties": {
        "inputLabel": {
          "type": "string",
          "title": "Inputlabel",
          "description": "Input node label this document was bound to."
        },
        "documentId": {
          "type": "string",
          "title": "Documentid",
          "description": "Resolved document id."
        },
        "uploadJobId": {
          "type": "string",
          "title": "Uploadjobid",
          "description": "Parse job id for a fresh upload; null when referencing an existing doc."
        },
        "status": {
          "$ref": "#/$defs/ProcessingStatus",
          "description": "Per-input processing status."
        }
      },
      "type": "object",
      "required": [
        "inputLabel",
        "documentId",
        "status"
      ],
      "title": "WorkflowV2RunInputResult"
    }
  }
}