# get_job_status (/reference/get-job-status)



[Creating](/reference/create-score) and [calibrating](/reference/calibrate) a score run as jobs.

## GET https://api.finic.ai/v1/jobs/{job_id}

Whether creating or calibrating a score has finished. It doesn't report progress: check every 30 seconds or so until `complete` is `true`. Not counted toward the request rate.

Authorization: `Bearer <API key>` (see [Authentication](/authentication)).
- Path parameter `job_id`: The `job_id` from creating or calibrating a score.

### Responses

- **200**: `complete` is `true` once the job has finished, whether it succeeded or failed. Complete without an `error` means the score is ready, or its calibration is in use. A failed creation leaves the score unusable (create a new one); a failed calibration leaves the score as it was.

| Field | Type | Always | Description |
| --- | --- | --- | --- |
| `job_id` | string | yes | The job's id |
| `complete` | boolean | yes | Whether the job has finished. |
| `error` | object |  | Only when the job failed. |
| `error.type` | string | yes | - `job_interrupted`: maintenance interrupted creating the score. Send the same data to `POST /v1/scores` again. - `internal_error`: something failed on Finic's side. Create the score, or send the outcomes, again. - `unavailable`: creating scores isn't available right now. Try again later. - `conflict`: the score changed during the calibration. Send the outcomes again. |
| `error.message` | string | yes | What to do. |

```json
{
  "job_id": "job_01M4XZXNCRZBPXV30MSF7RN5H3",
  "complete": true
}
```

- **401**: `authentication_error`: the API key is missing, unknown, revoked or expired.

- **404**: `job_not_found`: no job with this id in your organization.

## Waiting for a job [#waiting-for-a-job]

```python
import os
import time

import requests


def wait_for_job(job_id: str) -> None:
    while True:
        r = requests.get(f"https://api.finic.ai/v1/jobs/{job_id}",
                         headers={"Authorization": f"Bearer {os.environ['FINIC_API_KEY']}"}, timeout=30)
        r.raise_for_status()
        job = r.json()
        if job["complete"]:
            if "error" in job:
                raise RuntimeError(f"{job['error']['type']}: {job['error']['message']}")
            return
        time.sleep(30)
```
