> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Job Status and Lifecycle

## Overview

When you submit a job to the Extract API, it progresses through a series of states that track its execution from submission to completion. Understanding these states helps you monitor job progress, troubleshoot issues, and know when outputs are ready.

## Job Lifecycle

A successfully completed job progresses through these states in order:

![Job Lifecycle](/_fern-files/emtelligent-prod.docs.buildwithfern.com/6a12393dd4ffdf8d7db7c6c4c356d6d97c3d36b7b4525e829c147fcc151528f2/assets/extract/job_status_cycle.png)

## Job Statuses

| Status               | Definition                                                                                         | Description                                                                                                                                                                    |
| -------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `queued`             | Job received and created                                                                           |                                                                                                                                                                                |
| `ingesting`          | Data validation                                                                                    | Downloading the documents from customer's storage for processing                                                                                                               |
| `validating`         | Data ingestion                                                                                     | Validate source files against data contract. Validation starts after ingestion                                                                                                 |
| `running`            | Data processing and extraction                                                                     | Pipeline has started                                                                                                                                                           |
| `completed`          | Data ready for collection                                                                          | Pipeline has completed and output is available for customer to collect. Customer should call /collect to upload output to their storage                                        |
| `transferring`       | Uploading outputs to customer storage                                                              | Uploading the output files to the customer's s3 bucket                                                                                                                         |
| `transfer_completed` | Output files have been successfully transferred to customer storage                                |                                                                                                                                                                                |
| `transfer_failed`    | File download/upload was interrupted before all files were transferred                             | An error occurred during the file transfer - For e.g. STS credentials expired                                                                                                  |
| `failed`             | Failure occurred during the data ingestion phase due to an authentication or data validation error | Authentication to the customer's storage failed or one or more data contract requirements were not met. Fix and create a new job.                                              |
| `cancelled`          | Job was cancelled. Job can be cancelled if not completed or paused.                                |                                                                                                                                                                                |
| `paused`             | Job was paused                                                                                     | Jobs can only be paused and resumed by System Administrator. If you wish to stop a job, you should call /cancel. Paused state allows for emtelligent personnel to investigate. |

## State Transitions

![Job Transition](/_fern-files/emtelligent-prod.docs.buildwithfern.com/c865931f2bbc2af7c4940d6678603f51540e9bc7377afaa022e0b91e928f8feb/assets/extract/job_status_flow.png)

## Job Status Polling

### How to Check Job Status

Use the API endpoint to check the current status of your job:

```bash
curl -X 'GET' \
  'https://extraction-api.emtelligent.com/api/v1/jobs/<job_id>/status' \
  -H 'accept: application/json' \
  -H 'X-API-Key: <api-key>'
```

**Response Example:**

```json
{
    "job_id": "<job_id>",
    "job_name": "<job_name>",
    "job_status": "running",
    "job_details": {
        "queued": {
            "pipeline_name": "<pipeline_name>",
            "pipeline_params": {
                "extraction_type": [
                    "labs",
                    "vitals"
                ]
            }
        },
        "extract": {
            "queued_at": "<date-time>"
        }
    }
}
```