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



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

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

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

It also answers for a KYB [enrichment](/reference/kyb/businesses) job, with its `kind`, its `status` and, when it succeeded, its `result`. Finished KYB jobs are kept for 30 days.

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

### Responses

- **200**: `complete` is `true` once the job has finished, whether it succeeded or failed. Complete without an `error` means the scoring model is ready, or its calibration is in use. A failed creation leaves the scoring model unusable (create a new one); a failed calibration leaves it 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 | - `no_questions`: the calibration left no questions to score with. Add questions and calibrate again. - `internal_error`: something failed on Finic's side. Create or calibrate the scoring model again. - `unavailable`: creating or calibrating scoring models isn't available right now. Try again later. - `conflict`: the scoring model changed during the calibration. Calibrate 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)
```
