Pular para o conteúdo principal
Este é o esquema JSON público usado ao exportar dados extraídos, como valores de campo, estrutura de campos e erros de verificação de regras.
"$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Classification": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "IsResultClassConfident": {
          "type": "boolean"
        },
        "ResultClass": {
          "type": "string"
        },
        "ResultClassName": {
          "type": [
            "string",
            "null"
          ]
        },
        "ClassConfidences": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/ClassificationConfidence"
          }
        }
      },
      "required": [
        "ResultClass"
      ]
    },
    "ClassificationConfidence": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Class": {
          "type": "string"
        },
        "ClassName": {
          "type": [
            "string",
            "null"
          ]
        },
        "Confidence": {
          "type": "integer"
        }
      },
      "required": [
        "Class",
        "Confidence"
      ]
    },
    "ExportedRuleError": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "RuleName": {
          "type": "string"
        },
        "ErrorMessage": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "RuleName"
      ]
    },
    "ExtractedData": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "DocumentDefinition": { "$ref": "#/definitions/DocumentDefinition" },
        "RootObject": { "$ref": "#/definitions/ExtractedObject" },
        "Objects": {
          "type": "array",
          "items": { "$ref": "#/definitions/ExtractedObject" }
        }
      },
      "additionalProperties": false,
      "required": [ "DocumentDefinition", "RootObject" ]
    },
    "ExtractedDataDocument": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Id": {
          "type": "string"
        },
        "ExtractedData": {
          "$ref": "#/definitions/ExtractedData"
        },
        "Pages": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/Page"
          }
        },
        "ClassificationResult": {
          "$ref": "#/definitions/Classification"
        },
        "RuleErrors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/ExportedRuleError"
          }
        },
        "RegistrationParameters": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "Id"
      ]
    },
    "ExtractedDataTransaction": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string"
        },
        "SkillId": {
          "type": [
            "string",
            "null"
          ]
        },
        "SkillName": {
          "type": [
            "string",
            "null"
          ]
        },
        "Documents": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/ExtractedDataDocument"
          }
        },
        "CreationTime": {
          "type": "string",
          "format": "date-time"
        },
        "SourceFiles": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/FileModel"
          }
        },
        "RegistrationParameters": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "Id"
      ]
    },
    "FileModel": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Id": {
          "type": [
            "string",
            "null"
          ]
        },
        "Name": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Page": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "Id": {
          "type": [
            "string",
            "null"
          ]
        },
        "SourceFile": {
          "type": [
            "string",
            "null"
          ]
        },
        "SourceImagePageIndex": {
          "type": "integer"
        }
      }
    },
    "OID": {
      "type": "string"
    },
    "EnumValue": {
      "type": "object",
      "properties": {
        "Id": { "$ref": "#/definitions/OID" },
        "Name": { "type": "string" }
      },
      "additionalProperties": false,
      "required": [ "Id", "Name" ]
    },
    "Cardinality": {
      "type": "object",
      "properties": {
        "Min": { "type": "integer" },
        "Max": { "type": "integer" }
      },
      "additionalProperties": false,
      "required": [ "Min", "Max" ]
    },
    "ConceptField": {
      "type": "object",
      "properties": {
        "Id": { "type": "string" },
        "Name": { "type": "string" },
        "Type": {
          "type": "string",
          "enum": [ "String", "Image", "Concept", "ISODate", "Boolean", "Decimal", "Enum" ]
        },
        "EnumValues": {
          "type": "array",
          "items": { "$ref": "#/definitions/EnumValue" }
        },
        "ValueConcepts": {
          "type": "array",
          "items": { "$ref": "#/definitions/Concept" }
        },
        "ValueConceptIds": {
          "type": "array",
          "items": { "$ref": "#/definitions/OID" }
        },
        "Cardinality": { "$ref": "#/definitions/Cardinality" },
        "Hidden": { "type": "boolean" }
      },
      "additionalProperties": false,
      "required": [ "Id", "Name", "Type", "Cardinality" ]
    },
    "Concept": {
      "type": "object",
      "properties": {
        "Id": { "type": "string" },
        "Name": { "type": "string" },
        "Fields": {
          "type": "array",
          "items": { "$ref": "#/definitions/ConceptField" }
        }
      },
      "additionalProperties": false
    },
    "DocumentDefinition": {
      "type": "object",
      "properties": {
        "RootConcept": { "$ref": "#/definitions/Concept" },
        "Concepts": {
          "type": "array",
          "items": { "$ref": "#/definitions/Concept" }
        }
      },
      "additionalProperties": false,
      "required": [ "RootConcept" ]
    },
    "Rectangle": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "minItems": 4,
      "maxItems": 4
    },
    "ImageRegion": {
      "type": "object",
      "properties": {
        "Page": { "$ref": "#/definitions/OID" },
        "Rects": {
          "type": "array",
          "items": { "$ref": "#/definitions/Rectangle" }
        }
      },
      "additionalProperties": false,
      "required": [ "Page", "Rects" ]
    },
    "TextRange": {
      "type": "object",
      "properties": {
        "Begin": { "type": "integer" },
        "End": { "type": "integer" }
      },
      "additionalProperties": false,
      "required": [ "Begin", "End" ]
    },
    "Annotation": {
      "type": "object",
      "properties": {
        "Source": {
          "type": "string",
          "enum": [ "None", "Text", "Image" ]
        },
        "RawValue": { "type": "string" },
        "ImageRegions": {
          "type": "array",
          "items": { "$ref": "#/definitions/ImageRegion" }
        },
        "TextRanges": {
          "type": "array",
          "items": { "$ref": "#/definitions/TextRange" }
        },
        "IsEditedManually": { "type": "boolean" },
        "Confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "SuspiciousSymbols": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "Suggestions": {
          "description": "Possíveis variantes de normalização em caso de ambiguidade",
          "type": "array",
          "items": { "type": "string" }
        }
      },
      "additionalProperties": false,
      "required": [ "Source" ]
    },
    "ExtractedField": {
      "type": "object",
      "properties": {
        "Id": { "$ref": "#/definitions/OID" },
        "Annotations": {
          "type": "array",
          "items": { "$ref": "#/definitions/Annotation" }
        },
        "Value": {
          "oneOf": [
            {
              "description": "Valor de campo de texto, valor de enumeração ou referência de objeto",
              "type": "string"
            },
            {
              "description": "Valor de campo booleano",
              "type": "boolean"
            },
            {
              "description": "Valor de objeto embutido",
              "$ref": "#/definitions/ExtractedObject"
            }
          ]
        },
        "IsVerified": { "type": "boolean" },
        "NeedVerification": { "type": "boolean" }
      },
      "additionalProperties": false,
      "required": [ "Id", "Value" ]
    },
    "ExtractedFieldList": {
      "type": "object",
      "properties": {
        "Name": { "type": "string" },
        "List": {
          "type": "array",
          "items": { "$ref": "#/definitions/ExtractedField" }
        }
      },
      "additionalProperties": false,
      "required": [ "Name", "List" ]
    },
    "ExtractedObject": {
      "type": "object",
      "properties": {
        "Id": { "$ref": "#/definitions/OID" },
        "Annotations": {
          "type": "array",
          "items": { "$ref": "#/definitions/Annotation" }
        },
        "Concept": { "type": "string" },
        "ConceptId": { "$ref": "#/definitions/OID" },
        "Fields": {
          "type": "array",
          "items": { "$ref": "#/definitions/ExtractedFieldList" }
        }
      },
      "additionalProperties": false,
      "required": [ "Id" ]
    }
  },
  "type": "object",
    "properties": {
      "Transaction": {
        "$ref": "#/definitions/ExtractedDataTransaction"
      },
      "Version": {
        "type": "string"
      }
    },
    "required": [
      "Transaction",
      "Version"
    ]
}