API ReferenceDocument Processing
Process Files (Bulk Async)
Queue multiple documents for asynchronous extraction in a single request.
POST
/api/v1/document/{extractionSchemaId}/process-files-asyncASYNCBULKQueue multiple documents for asynchronous processing in a single request. Each file is processed independently and you can poll for individual results using the get-file-data endpoint.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
extractionSchemaId | string | path | Yes | The extraction schema ID to use for processing all files. |
fileIds | string[] | body | Yes | Array of file IDs to process. Each must have been uploaded via the get-url endpoint. |
Request
const response = await fetch(
`https://app.limai.io/api/v1/document/${SCHEMA_ID}/process-files-async`,
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
fileIds: ["file_abc123", "file_def456", "file_ghi789"]
})
}
)
const result = await response.json()Response
Response200
{
"message": "Jobs queued for processing",
"jobs": [
{
"fileId": "file_abc123",
"jobId": "job_001"
},
{
"fileId": "file_def456",
"jobId": "job_002"
},
{
"fileId": "file_ghi789",
"jobId": "job_003"
}
]
}Retrieving Results
Poll the get-file-data endpoint for each file individually, or use the get-files-data endpoint to fetch results for multiple files in a single request.