Job Status
Get or update the processing status of a queued job
Get Job Status
/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
{
"id": "job_abc123",
"status": "COMPLETED",
"extractionStageStatus": "COMPLETED",
"bboxStageStatus": "PROCESSING"
}bboxStageStatus tracks the bounding-box stage, which runs after the job reaches COMPLETED when the model's bounding-box tier is FAST, BALANCED or PRO. It is one of PENDING, PROCESSING, COMPLETED, FAILED or SKIPPED (SKIPPED when the tier computes no bounding boxes). A FAILED bounding-box stage leaves the job COMPLETED with its extracted values intact; only the boxes are missing. When you need bounding boxes, poll until bboxStageStatus is COMPLETED or FAILED before reading the data with include=boundingBoxes.
Update Job Status
/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
{
"id": "job_abc123",
"status": "COMPLETED",
"extractionStageStatus": "COMPLETED",
"updatedAt": "2025-01-15T10:31:00.000Z"
}