> ## Documentation Index
> Fetch the complete documentation index at: https://docs.altohealth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Job Status

> Retrieve the status of an extraction job

## Overview

Check the status of an extraction job using the job ID returned from the Extract endpoint. Use this to monitor the progress of your document extraction tasks.

## Endpoint

```
GET https://app.arahealth.io/v1/jobs/{job_id}
```

**Base URL:** `https://app.arahealth.io`
**Path:** `/v1/jobs/{job_id}`
**Method:** `GET`
**Authentication:** None required

## Path Parameters

* `job_id` (required) - The job identifier returned from the Extract endpoint

## Code Examples

<CodeGroup>
  ```csharp C# theme={null}
  var client = new HttpClient();
  var request = new HttpRequestMessage(HttpMethod.Get, "https://app.arahealth.io/v1/jobs/your_job_id");
  var response = await client.SendAsync(request);
  response.EnsureSuccessStatusCode();
  Console.WriteLine(await response.Content.ReadAsStringAsync());
  ```

  ```javascript JavaScript theme={null}
  const jobId = 'your_job_id';

  const response = await fetch(`https://app.arahealth.io/v1/jobs/${jobId}`, {
    method: 'GET'
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  job_id = "your_job_id"
  url = f"https://app.arahealth.io/v1/jobs/{job_id}"

  response = requests.get(url)
  print(response.json())
  ```

  ```bash cURL theme={null}
  curl -X GET https://app.arahealth.io/v1/jobs/your_job_id
  ```
</CodeGroup>

## Response

The response returns the current status of the job:

```json theme={null}
{
  "job_id": "example_job_id_456",
  "status": "pending",
  "message": "Task is still processing"
}
```

### Response Fields

* `job_id` - The job identifier
* `status` - Current status of the job:
  * `pending` - Job is queued and waiting to start
  * `processing` - Job is currently being processed
  * `completed` - Job has finished successfully
  * `failed` - Job encountered an error
* `message` - Descriptive message about the current status

## Usage Flow

1. Upload a document using the [Document Upload endpoint](/api-reference/endpoint/document-upload)
2. Processing begins automatically, creating a job
3. Poll this endpoint periodically using the `job_id` to check the job status
4. When `status` is `completed`, the data extraction and pathway execution are complete

### Example Polling Pattern

```javascript JavaScript theme={null}
async function waitForJobCompletion(jobId) {
  while (true) {
    const response = await fetch(`https://app.arahealth.io/v1/jobs/${jobId}`);
    const data = await response.json();

    if (data.status === 'completed') {
      console.log('Job completed successfully!');
      return data;
    } else if (data.status === 'failed') {
      console.error('Job failed:', data.message);
      throw new Error(data.message);
    }

    // Wait 2 seconds before checking again
    await new Promise(resolve => setTimeout(resolve, 2000));
  }
}
```


## OpenAPI

````yaml GET /v1/jobs/{job_id}
openapi: 3.1.0
info:
  title: Alto HealthAPI
  description: API for managing healthcare records and document uploads
  version: 1.0.0
servers:
  - url: https://app.arahealth.io
security:
  - bearerAuth: []
paths:
  /v1/jobs/{job_id}:
    get:
      summary: Get Job Status
      description: Retrieve the status of an extraction job by job ID
      parameters:
        - name: job_id
          in: path
          description: Job identifier
          required: true
          schema:
            type: string
            example: your_job_id
      responses:
        '200':
          description: Job status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    JobStatusResponse:
      type: object
      properties:
        job_id:
          type: string
          description: Job identifier
          example: example_job_id_456
        status:
          type: string
          description: Current status of the job
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        message:
          type: string
          description: Status message
          example: Task is still processing
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code or type
        message:
          type: string
          description: Human-readable error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your Alto Health API key

````