Get Files Data (Bulk)
Retrieve extracted data for multiple files in a single request.
/api/v1/document/get-files-dataRetrieve extracted data for multiple files in a single request. Accepts up to 100 file IDs and returns data for all accessible files.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
fileIds | string[] | body | Yes | Array of file IDs to retrieve data for. Minimum 1, maximum 100. |
include | string[] | body | No | Optional enrichments to include: confidence, boundingBoxes, validations. Omit for the plain data payload. |
Optional Enrichments
By default each file's payload contains only the extracted values. Pass include to enrich the response:
confidence— adds aconfidenceobject to every cell withoverall,llm,layout, andconsensusscores (0–1,nullwhen not computed).boundingBoxes— adds aboundingBoxesarray to every cell. Each box is{"page": "2", "bbox": [yMin, xMin, yMax, xMax]}in normalized 0–1000 coordinates with the origin at the top-left.nullwhen boxes were never computed for the cell.validations— adds avalidationsarray to every cell (normalized entries withcheckKey,sourceofRULE/SCRIPT/AGENT,passed,message,expected,actual,amended) plus a per-filevalidationsobject containing the aggregatefailCount, per-check results (checks), and declarative rule results (rules).
Every cell's metadata also carries the column slug, alongside the table-level and column-list slugs, so responses can be consumed by stable slug instead of display name.
Note: documents processed through the synchronous process-file endpoint skip the confidence and bounding-box stages, so those fields stay null for such files even when requested. Use the async processing endpoints when you need them.
Request
const response = await fetch(
"https://app.limai.io/api/v1/document/get-files-data",
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
fileIds: ["file_abc123", "file_def456", "file_ghi789"],
include: ["confidence", "validations"]
})
}
)
const results = await response.json()Response
Returns an object where each key is a file ID and the value contains the file's data and status.
{
"file_abc123": {
"status": "COMPLETED",
"fileId": "file_abc123",
"data": {
"tables": {}
}
},
"file_def456": {
"status": "PROCESSING",
"fileId": "file_def456"
},
"file_ghi789": {
"status": "FAILED",
"fileId": "file_ghi789",
"errorMessage": "File not found"
}
}Validation Error
{
"error": "Validation error",
"details": {
"fieldErrors": {
"fileIds": [
"Array must contain at least 1 element(s)"
]
}
}
}