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

# Check Status

> Learn how to monitor the processing status of your documents

## Checking Processing Status

After submitting documents for processing, you can monitor their status using the job ID received in the processing response.

## Status Endpoints

<Tabs>
  <Tab title="Invoices">
    ```bash cURL theme={null}
    curl "https://api.invaro.ai/api/v1/parse/invoices/{job_id}" \
      -H "Authorization: Bearer your_api_key"
    ```

    ```javascript JavaScript theme={null}
    const response = await fetch(`https://api.invaro.ai/api/v1/parse/invoices/${job_id}`, {
      headers: {
        'Authorization': 'Bearer your_api_key'
      }
    });

    const data = await response.json();
    const status = data.data.status;
    ```
  </Tab>

  <Tab title="Bank Statements">
    ```bash cURL theme={null}
    curl "https://api.invaro.ai/api/v1/parse/statements/{job_id}" \
      -H "Authorization: Bearer your_api_key"
    ```

    ```javascript JavaScript theme={null}
    const response = await fetch(`https://api.invaro.ai/api/v1/parse/statements/${job_id}`, {
      headers: {
        'Authorization': 'Bearer your_api_key'
      }
    });

    const data = await response.json();
    const status = data.data.status;
    ```
  </Tab>

  <Tab title="Schemas">
    <p>You can also check the status or details of your configured schemas.</p>

    **List All Schemas**

    ```bash cURL theme={null}
    # Get the first page of schemas
    curl "https://api.invaro.ai/api/v1/schemas/list" \
      -H "Authorization: Bearer your_api_key"
    ```

    <p>See the [List Schemas API Reference](/api-reference/endpoints/schemas/list-schemas) for pagination and filtering options.</p>

    **Get Schema by ID**

    ```bash cURL theme={null}
    curl "https://api.invaro.ai/api/v1/schemas/id/{schema_id}" \
      -H "Authorization: Bearer your_api_key"
    ```

    <p>See the [Get Schema by ID API Reference](/api-reference/endpoints/schemas/get-schema) for response details.</p>
  </Tab>
</Tabs>

## Status Response

The API returns the current status of the processing job:

```json theme={null}
{
  "success": true,
  "data": {
    "job_id": "job_1739261168870934041",
    "status": "completed", // or "processing", "pending", "failed"
    "file_id": "sample_document.pdf",
    "created_at": "2024-01-07T10:00:00Z",
    "updated_at": "2024-01-07T10:01:00Z",
    "progress": 100,
    "results": {
      // Processed document data
    }
  }
}
```

## Status Values

* **pending** - Job is queued for processing
* **processing** - Document is being processed
* **completed** - Processing finished successfully
* **failed** - Processing failed

## Implementing Status Polling

Here's an example of how to implement status polling:

```javascript JavaScript theme={null}
async function pollStatus(jobId, docType = 'invoices') {
  while (true) {
    const response = await fetch(`https://api.invaro.ai/api/v1/parse/${docType}/${jobId}`, {
      headers: {
        'Authorization': 'Bearer your_api_key'
      }
    });

    const data = await response.json();
    const status = data.data.status;

    if (status === 'completed') {
      return data.data.results;
    } else if (status === 'failed') {
      throw new Error('Processing failed');
    }

    // Wait 5 seconds before next check
    await new Promise(resolve => setTimeout(resolve, 5000));
  }
}
```

<Note>
  When polling for status, implement appropriate retry logic and error handling. We recommend polling every 5-10 seconds.
</Note>

## Next Steps

<Card title="Code Examples" icon="code" href="/quickstart/code-examples">
  See complete code examples for the entire workflow
</Card>
