API ReferenceDeployments
Document Detail
Get document details, pages, and content for a specific file
Get Document Detail
GET
/api/v1/deployments/{deploymentId}/documents/{fileId}Returns detailed information about a document including its metadata, row references, file conversions, and validation results.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileId | string | path | Yes | The file ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/documents/file_001",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const doc = await res.json();Response
Response200
{
"id": "file_001",
"name": "invoice.pdf",
"originalExtension": "pdf",
"status": "EXTRACTED",
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:31:00.000Z",
"confidenceScore": 0.92,
"validationFailCount": 0,
"inExamplePool": false,
"alias": null,
"metadata": null,
"conversions": [
{
"extension": "md",
"status": "COMPLETED"
}
],
"rows": [
{
"rowId": "row_001",
"status": "PENDING",
"tableId": "tbl_001"
}
],
"validations": {
"crossField": [],
"row": [],
"document": []
}
}Get Document Pages
GET
/api/v1/deployments/{deploymentId}/documents/{fileId}/pagesReturns page-level access URLs for a document. For PDFs, returns a single PDF URL. For images, returns the image URL directly.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileId | string | path | Yes | The file ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/documents/file_001/pages",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const pages = await res.json();Response
Response200
{
"fileId": "file_001",
"fileName": "invoice.pdf",
"type": "pdf",
"pageCount": 3,
"pdfUrl": "https://s3.amazonaws.com/...presigned-url...",
"pages": []
}Get Document Content
GET
/api/v1/deployments/{deploymentId}/documents/{fileId}/contentReturns the document content including markdown text, PDF URL, and source file URL.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
deploymentId | string | path | Yes | The deployment ID |
fileId | string | path | Yes | The file ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/documents/file_001/content",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const content = await res.json();Response
Response200
{
"fileId": "file_001",
"fileName": "invoice.pdf",
"markdownContent": "# Invoice\\n\\nInvoice Number: INV-2025-001\\n...",
"pdfUrl": "https://s3.amazonaws.com/...pdf-url...",
"sourceFileUrl": "https://s3.amazonaws.com/...source-url...",
"hasMarkdown": true,
"hasPdf": true,
"originalExtension": "pdf"
}