> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ferofill.com/llms.txt
> Use this file to discover all available pages before exploring further.

# General Endpoint

> Use the general endpoint when you have multiple lines of business or want automatic document classification.

<Note>Requests to the general endpoint will take longer than LOB specific extraction.</Note>

### Request

<ParamField body="files" type="file[]" required>
  Upload one or more documents for extraction. Supported file formats: pdf, jpeg, png, xlsx, docx, pptx, csv, and txt.
</ParamField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "data": [
      {
        "template_confidence": 94,
        "template": "acord_127_2023",
        "processing_time": "2.3s",
        "start_page": 1,
        "end_page": 2,
        "extracted_fields": [
          {
            "field_name": "applicant_name",
            "value": "ABC Transportation Inc",
            "confidence": 98,
            "location": {"page": 1, "x": 0.1, "y": 0.15, "width": 0.3, "height": 0.02},
            "data_type": "text"
          }
        ],
        "tables": [
          {
            "table_id": "vehicle_schedule",
            "title": "Schedule of Vehicles", 
            "confidence": 92,
            "location": {"page": 2, "x": 0.05, "y": 0.2, "width": 0.9, "height": 0.6},
            "structure": {
              "headers": ["Vehicle ID", "Year", "Make", "Model", "VIN"],
              "rows": [
                {
                  "row_index": 0,
                  "cells": [
                    {"column": "Vehicle ID", "value": "001"},
                    {"column": "Year", "value": "2022"}
                  ]
                }
              ]
            }
          }
        ]
      }
    ],
    "error": null
  }
  ```

  ```json Failed Response theme={null}
  {
    "data": [],
    "error": {
      "message": "Unsupported file/Model overloaded/Rate limit/Unauthorized",
      "status": "415/503/429/401"
    }
  }
  ```
</ResponseExample>

### Response

All endpoints return a consistent response structure:

<ResponseField name="data" type="array" required>
  Array of extracted document data objects

  <Expandable title="Document Data Object">
    <ResponseField name="template_confidence" type="number">
      Confidence score (0-100) for document template identification
    </ResponseField>

    <ResponseField name="template" type="string">
      Identified document template (e.g., "acord\_127\_2023")
    </ResponseField>

    <ResponseField name="processing_time" type="string">
      Time taken to process the document
    </ResponseField>

    <ResponseField name="start_page" type="number">
      First page number of the document
    </ResponseField>

    <ResponseField name="end_page" type="number">
      Last page number of the document
    </ResponseField>

    <ResponseField name="extracted_fields" type="array">
      Array of extracted field objects with values and locations
    </ResponseField>

    <ResponseField name="tables" type="array">
      Array of extracted table objects with structured data
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="error" type="string | null">
  Error message if processing failed, null if successful
</ResponseField>
