GET
/
jobs
const options = {
  method: 'GET',
  headers: {
    'x-api-key': '<your-api-key>',
    'Content-Type': 'application/json',
  },
};

fetch('https://api.getomni.ai/jobs?status=COMPLETE&page=1&size=10', options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "jobs": [
    {
      "jobId": "123e4567-e89b-12d3-a456-426614174001",
      "completedAt": "2023-09-10T15:30:45.123Z",
      "createdAt": "2023-09-10T15:29:45.123Z",
      "requestBody": {
        "documentUrl": "https://example.com/document.pdf"
      },
      "responseBody": {
        "ocr": {
          "pages": [],
        }
        "extracted": {
          "name": "John Doe",
          "amount": "1500"
        }
      },
      "status": "COMPLETE",
      "statusUpdatedAt": "2023-09-10T15:30:45.123Z",
      "extractId": "123e4567-e89b-12d3-a456-426614174002",
      "pagesProcessed": 2
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 10,
    "totalCount": 42,
    "totalPages": 5,
    "nextPage": 2,
    "previousPage": null
  }
}

This endpoint allows you to fetch a list of jobs in your workspace with support for filtering by status, review status, and template ID. Results are paginated.

Query Parameters

status
enum

Filter jobs by their processing status. Valid values are: IN_PROGRESS, COMPLETE, CANCELLED, ERROR, PAUSED, PENDING, RETRY

reviewStatus
enum

Filter jobs by their human review status. Valid values are: APPROVED, REJECTED, PENDING, CANCELLED

templateId
string

Filter jobs by template ID

page
number
default:"1"

Page number for pagination (starts at 1)

size
number
default:"100"

Number of jobs per page (default: 100)

Response

jobs
array

Array of job objects

pagination
object

Pagination information

const options = {
  method: 'GET',
  headers: {
    'x-api-key': '<your-api-key>',
    'Content-Type': 'application/json',
  },
};

fetch('https://api.getomni.ai/jobs?status=COMPLETE&page=1&size=10', options)
  .then((response) => response.json())
  .then((response) => console.log(response))
  .catch((err) => console.error(err));
{
  "jobs": [
    {
      "jobId": "123e4567-e89b-12d3-a456-426614174001",
      "completedAt": "2023-09-10T15:30:45.123Z",
      "createdAt": "2023-09-10T15:29:45.123Z",
      "requestBody": {
        "documentUrl": "https://example.com/document.pdf"
      },
      "responseBody": {
        "ocr": {
          "pages": [],
        }
        "extracted": {
          "name": "John Doe",
          "amount": "1500"
        }
      },
      "status": "COMPLETE",
      "statusUpdatedAt": "2023-09-10T15:30:45.123Z",
      "extractId": "123e4567-e89b-12d3-a456-426614174002",
      "pagesProcessed": 2
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageSize": 10,
    "totalCount": 42,
    "totalPages": 5,
    "nextPage": 2,
    "previousPage": null
  }
}