API ReferenceQueue
Job Status
Get or update the processing status of a queued job
Get Job Status
GET
/api/v1/queue/{jobId}/statusReturns the current processing status of a queued extraction job.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
jobId | string | path | Yes | The queue job ID |
Request
const res = await fetch(
"https://app.limai.io/api/v1/queue/job_abc123/status",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const status = await res.json();Response
Response200
{
"id": "job_abc123",
"status": "PROCESSING",
"extractionStageStatus": "PROCESSING"
}Update Job Status
PATCH
/api/v1/queue/{jobId}/statusUpdates the processing status of a job. Valid transitions: PENDING to PROCESSING, PROCESSING to COMPLETED or FAILED. When marking a job as COMPLETED, webhook events are automatically fired. When marking as FAILED, an error message is required.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
jobId | string | path | Yes | The queue job ID |
status | string | body | Yes | New status: PROCESSING, COMPLETED, or FAILED |
errorMessage | string | body | No | Error message (required when status is FAILED) |
pages | integer | body | No | Number of pages processed |
rows | integer | body | No | Number of rows extracted |
Request
const res = await fetch(
"https://app.limai.io/api/v1/queue/job_abc123/status",
{
method: "PATCH",
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
status: "COMPLETED",
pages: 3,
rows: 1,
}),
}
);Response
Response200
{
"id": "job_abc123",
"status": "COMPLETED",
"extractionStageStatus": "COMPLETED",
"updatedAt": "2025-01-15T10:31:00.000Z"
}