Limai Docs
API ReferenceDeployments

Corrections

View corrections and correction patterns for a deployment

List Corrections

GET/api/v1/deployments/{deploymentId}/corrections

Returns a paginated list of corrections made to extracted data. Each correction shows the original extracted value and the corrected value.

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe deployment ID
limitintegerqueryNoResults per page (1-500)(default: 50)
offsetintegerqueryNoNumber of results to skip(default: 0)
columnIdstringqueryNoFilter corrections by column ID
fileIdstringqueryNoFilter corrections by file ID
startDatestringqueryNoFilter by start date (ISO 8601)
endDatestringqueryNoFilter by end date (ISO 8601)

Request

const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/corrections?limit=20",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const { data, pagination } = await res.json();

Response

Response200
{
  "data": [
    {
      "cellId": "cell_001",
      "rowId": "row_001",
      "columnId": "col_001",
      "columnName": "Invoice Number",
      "tableName": "Primary Table",
      "extractionValue": "INV-2025",
      "correctedValue": "INV-2025-001",
      "updatedAt": "2025-01-16T14:00:00.000Z",
      "fileId": "file_001",
      "fileName": "invoice.pdf"
    }
  ],
  "pagination": {
    "total": 15,
    "limit": 20,
    "offset": 0
  }
}

Correction Patterns

GET/api/v1/deployments/{deploymentId}/correction-patterns

Analyzes corrections to identify recurring patterns. Useful for discovering systematic extraction errors.

Parameters

NameTypeInRequiredDescription
deploymentIdstringpathYesThe deployment ID
topNintegerqueryNoNumber of top patterns to return per column (1-100)

Request

const res = await fetch(
"https://app.limai.io/api/v1/deployments/dep_abc123/correction-patterns?topN=5",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const { data } = await res.json();

Response

Response200
{
  "data": [
    {
      "columnId": "col_001",
      "columnName": "Date",
      "tableName": "Primary Table",
      "totalCorrections": 12,
      "patterns": [
        {
          "extractedValue": "01/15/2025",
          "correctedValue": "2025-01-15",
          "count": 8
        }
      ]
    }
  ]
}