{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudmersive/json-schema/cloudmersive-extract-document-job-status-result-schema.json",
  "title": "ExtractDocumentJobStatusResult",
  "description": "Result of performing a batch job operation",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudmersive-runbatchjob-api-openapi.yml#/components/schemas/ExtractDocumentJobStatusResult",
  "type": "object",
  "properties": {
    "Successful": {
      "description": "True if the operation to check the status of the job was successful, false otherwise",
      "type": "boolean"
    },
    "AsyncJobStatus": {
      "description": "Returns the job status of the Async Job, if applicable.  Possible states are STARTED and COMPLETED",
      "type": "string"
    },
    "AsyncJobID": {
      "description": "Job ID",
      "type": "string"
    },
    "ExtractTextResult": {
      "$ref": "#/$defs/ExtractTextResponse"
    },
    "ExtractFieldsAndTablesResult": {
      "$ref": "#/$defs/ExtractFieldsAndTablesResponse"
    },
    "ExtractFieldsResult": {
      "$ref": "#/$defs/ExtractFieldsResponse"
    },
    "ExtractClassificationResult": {
      "$ref": "#/$defs/DocumentClassificationResult"
    },
    "ErrorMessage": {
      "description": "Error message (if any)",
      "type": "string"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DocumentClassificationResult": {
      "description": "Result of classifying a document using AI",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentCategoryResult": {
          "description": "Category applied to the document; if a category could not be identified then \"other\" will be used.  Spaces are replaced with underscores.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ExtractFieldsAndTablesResponse": {
      "description": "Result of extracting fields from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "FieldResults": {
          "description": "Field value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldValue"
          }
        },
        "TableResults": {
          "description": "Table value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TableResult"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractFieldsResponse": {
      "description": "Result of extracting fields from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "Results": {
          "description": "Field value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldValue"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractTextResponse": {
      "description": "Result of extracting text from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "PageResults": {
          "description": "Page results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExtractedTextPage"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractedTextPage": {
      "description": "Extracted page from an input document",
      "type": "object",
      "properties": {
        "PageNumber": {
          "format": "int32",
          "description": "Page number index, 1-based",
          "type": "integer"
        },
        "TextResult": {
          "description": "Text content of the page",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FieldValue": {
      "description": "Field value result of extracting fields from a document",
      "type": "object",
      "properties": {
        "FieldName": {
          "description": "Name of the field (note that spaces will be replaced with underscore)",
          "type": "string"
        },
        "FieldStringValue": {
          "description": "Primary or first string value of the field that was extractged from the document",
          "type": "string"
        },
        "AdditionalFieldStringValues": {
          "description": "Additional values for this field when the same field is present with multiple values, for example, if two instances of the same form occur in the same document",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "TableResult": {
      "description": "Table extracted from a document",
      "type": "object",
      "properties": {
        "Title": {
          "description": "Title of the table (optional)",
          "type": "string"
        },
        "Rows": {
          "description": "Rows of the table",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TableResultRow"
          }
        }
      },
      "additionalProperties": false
    },
    "TableResultCell": {
      "description": "Cell of a row of a table extracted from a document",
      "type": "object",
      "properties": {
        "CellHeader": {
          "description": "Cell column header",
          "type": "string"
        },
        "CellValue": {
          "description": "Cell value as a string",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TableResultRow": {
      "description": "Row of a table extracted from a document",
      "type": "object",
      "properties": {
        "Cells": {
          "description": "Cells in the row",
          "type": "array",
          "items": {
            "$ref": "#/$defs/TableResultCell"
          }
        }
      },
      "additionalProperties": false
    }
  }
}