Limai Docs
API ReferenceDocument Processing

Get All Data

Retrieve all processed data for a model or deployment in a simplified, flattened format.

GET/api/v1/deployments/{deploymentId}/all-data

Retrieve all processed data for a model or deployment in a simplified, flattened JSON format. Data is organized by filename with normalized column names, making it ideal for bulk export, analytics, and integration with external systems.

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe model or deployment, returned when listing a project's deployments.
includestringqueryNoComma-separated list of optional enrichments. The allowed value is metadata.

Request

const response = await fetch(
`https://app.limai.io/api/v1/deployments/${deploymentId}/all-data?include=metadata`,
{
  headers: { "Authorization": `Bearer ${API_TOKEN}` }
}
)
const allData = await response.json()

for (const [filename, fileData] of Object.entries(allData)) {
const records = Array.isArray(fileData) ? fileData : [fileData]
for (const record of records) {
  console.log(filename, record)
}
}

Response

Data is organized by filename. Single-row documents return an object; multi-row documents return an array. Nested tables appear as direct properties.

Multi-Row Example

Response200
{
  "invoice_001.pdf": [
    {
      "invoice_number": "INV-001",
      "total_amount": "1000.00",
      "line_items": [
        {
          "item_description": "Software License",
          "quantity": "1",
          "unit_price": "800.00"
        }
      ]
    },
    {
      "invoice_number": "INV-002",
      "total_amount": "500.00"
    }
  ],
  "invoice_002.pdf": {
    "invoice_number": "INV-003",
    "total_amount": "750.00"
  }
}

Empty Response

Returns an empty object {} when no data exists for the model or deployment.

Metadata

include=metadata adds a reserved _meta key to every top-level row object — the object returned for a single-row file, and each array element for a multi-row file. Rows of nested tables carry no _meta.

Response200
{
  "invoice_001.pdf": [
    {
      "invoice_number": "INV-001",
      "total_amount": "1000.00",
      "_meta": {
        "documentId": "cmm3k1q9x0001",
        "fileName": "invoice_001.pdf",
        "submittedAt": "2026-09-01T10:12:33.000Z",
        "submittedBy": {
          "id": "usr_8a2f",
          "name": "Jane Doe",
          "email": "jane@acme.com"
        },
        "extractedAt": "2026-09-01T10:14:02.000Z"
      }
    },
    {
      "invoice_number": "INV-002",
      "total_amount": "500.00",
      "_meta": {
        "documentId": "cmm3k1q9x0001",
        "fileName": "invoice_001.pdf",
        "submittedAt": "2026-09-01T10:12:33.000Z",
        "submittedBy": {
          "id": "usr_8a2f",
          "name": "Jane Doe",
          "email": "jane@acme.com"
        },
        "extractedAt": "2026-09-01T10:14:02.000Z"
      }
    }
  ],
  "broker-quote-2026-09.pdf": {
    "broker": "Acme Brokerage",
    "premium": "2400.00",
    "_meta": {
      "documentId": "cmm3k7r2v0007",
      "fileName": "broker-quote-2026-09.pdf",
      "submittedAt": "2026-09-02T08:41:10.000Z",
      "submittedBy": null,
      "extractedAt": null
    }
  }
}

Fields of _meta:

FieldDescription
documentIdThe file's ID.
fileNameThe uploaded file name.
submittedAtWhen the file was uploaded, shown as "Date Added" in the grid.
submittedByThe user who uploaded the document, as { id, name, email }. null when the uploader is unknown.
extractedAtWhen the latest extraction run completed. null when no run has completed.

_meta never collides with a schema column: column keys are normalized with leading underscores stripped, so no column can produce a key beginning with an underscore.

An unrecognized include value returns a 400:

Response400
{
  "error": "Invalid include option. Allowed values: metadata"
}

Backwards compatibility

Without include, the response shape is exactly the one documented under Response.

Column Name Normalization

All column and table names are automatically normalized in the response:

  1. Convert to lowercase
  2. Replace spaces and slashes with underscores
  3. Remove special characters (keep letters, numbers, underscores)
  4. Collapse multiple underscores into one
  5. Remove leading/trailing underscores
Original NameNormalized
Invoice Numberinvoice_number
Total Amount ($)total_amount
Client's Emailclients_email
Date/Timedate_time

If multiple columns normalize to the same name, the API returns a 400 error with details about the conflicting columns. Rename one column in the platform to resolve the conflict.

On this page