---
title: "GET /v1/consistency/jobs/{job_id}"
description: "Check a packet job and get its result when the run is done."
---

# GET /v1/consistency/jobs/{job_id}

Check a packet job and get its result when the run is done.

Source URL: https://trymighty.ai/docs/api-reference/consistency-jobs

A packet may take longer than one request. Use the job route to check its progress and get the same result when it is ready. The route is available only when Consistency is on for your organization.

```mermaid
flowchart LR
  A["Packet in<br/>documents and known facts"] --> B["Compare<br/>documents and facts"] --> C["Plain answer<br/>what may disagree"] --> D["Proof<br/>where to check"]
```

## Read a result

A delivered job includes the packet result. Its `summary.headline` counts visible problems. Each visible finding can include `headline` and `what_to_check`. Check `status.coverage.complete` before closing a quiet result.

## For claims reviewers

A job response gives its state while the packet runs. When `result` appears, read the findings and the coverage status as you would for an immediate packet response. If the final state is `partial`, some content was not read. If it is `abandoned`, there is no result or charge.

Polling does not run the comparison again and does not add a charge.

## Technical details

### Authentication

Send the same bearer key you used to submit the packet:

```http
GET /v1/consistency/jobs/{job_id}
Authorization: Bearer $MIGHTY_API_KEY
```

A job is visible only to the organization that submitted it. A job id from another organization returns `404 job_not_found`, the same answer as a job that does not exist.

### Request

| Part | Required | Rules |
| --- | --- | --- |
| `job_id` path parameter | Yes | The UUID from the `202` body or its `Location` header. |
| `Authorization` header | Yes | `Bearer` and your API key. |

The route has no body and no query parameters. Polling is read-only and costs nothing.

### Response

| Field | Type | Meaning |
| --- | --- | --- |
| `job_id` | string | The job. |
| `state` | string | `accepted`, `queued`, `sectioned`, `matched`, `evaluated`, `committed`, `delivered`, `retryable`, `partial`, or `abandoned`. |
| `attempt` | integer | How many times the job has run. |
| `result_version` | integer | Goes up by one each time a new result is stored. |
| `result` | object | The packet response, once the job has one. Absent before that. Its fields are in [Response](/docs/api-reference/consistency-packets#response). |

`delivered`, `partial`, and `abandoned` are final. Stop polling when you see one of them, or when `result` is present.

| `state` | What to do |
| --- | --- |
| `accepted`, `queued`, `sectioned`, `matched`, `evaluated`, `committed` | Wait `Retry-After` seconds and poll again. |
| `retryable` | A step failed and the job will run again. Keep polling. |
| `delivered` | Read `result`. |
| `partial` | Read `result`. `result.status.coverage.complete` is `false`; some sections or documents were not read. |
| `abandoned` | The gateway could not finish within 24 hours. There is no result and nothing is billed. Submit the packet again with a new `Idempotency-Key`. |

While the job has no result and is not final, the answer carries `Retry-After: 5`.

Example while the job runs:

```json
{
  "job_id": "0b8f6a52-3c1d-4e7a-9f55-2d7c1e9a4b10",
  "state": "queued",
  "attempt": 0,
  "result_version": 0
}
```

Example when it is done (the `result` is shortened):

```json
{
  "job_id": "0b8f6a52-3c1d-4e7a-9f55-2d7c1e9a4b10",
  "state": "delivered",
  "attempt": 1,
  "result_version": 1,
  "result": {
    "status": { "pack": "healthcare_opnote_test@5", "coverage": { "complete": true } },
    "documents": [{ "id": "d1", "status": "ok", "pages": 2 }, { "id": "d2", "status": "ok", "pages": 2 }],
    "findings": [],
    "summary": {
      "headline": "0 problems found across 2 documents.",
      "sentence": "No problems need review.",
      "counts": { "documents_checked": 2, "documents_with_problems": 0, "problems": 0 }
    },
    "cases": [],
    "claims": [],
    "evidence_package_ref": "5d2e9a0c…"
  }
}
```

### Evidence And Replay

Each finding in `result.findings[]` points at its evidence. `locations[]` marks the place on your document, and `matched_locations[]` marks the place on the document it matched. A location is a text range in the extracted text, a box on a rendered page, one of your claim-line fields, or a whole document. See [Locations](/docs/api-reference/consistency-packets#locations).

`result.evidence_package_ref` names the sealed evidence package for the decision. `result.provenance` holds the hashes of your inputs and the rule versions that ran. Store both with your case: they let you show later which inputs and which rules produced a finding. The evidence package holds keyed tokens and locations, never readable document text. There is no public route to download an evidence package in Preview.

To get the same answer again, you have two safe options:

| You have | Do this | You get |
| --- | --- | --- |
| The `job_id` | Poll this route again. | The stored result. Nothing runs again and nothing is billed again. |
| The original request | Send `POST /v1/consistency/packets` with the same `Idempotency-Key` and the same body. | The answer the first request got. A finished sync packet returns the same bytes. It is not billed again. |

The same `Idempotency-Key` with a different body returns `409 idempotency_key_reused`. A second request with a key whose first request is still running returns `409 idempotency_key_in_flight` with `Retry-After: 5`.

### Errors

Error bodies are `{"error": "<message>", "code": "<code>"}`. `503` carries `Retry-After: 5`.

| Status | `code` | When |
| --- | --- | --- |
| `401` | `api_key_required` | No valid API key. |
| `402` | none | Not returned by this route. Polling is never billed. |
| `404` | none | Consistency is not turned on for this gateway. The route does not exist. |
| `404` | `job_not_found` | The id is not a UUID, the job does not exist, or it belongs to another organization. |
| `413` | none | Not returned by this route. Size limits apply when you submit the packet. |
| `503` | `store_unavailable`, `org_keys_unavailable` | The job store or your organization's keys are not reachable. Retry after the delay. |

### Billing

Consistency costs 6 SCU per page (an image document counts as one page). A packet is billed once, when its result is committed. Polling a job and replaying a request with the same `Idempotency-Key` cost nothing. An `abandoned` job costs nothing. See [Consistency Privacy And Billing](/docs/consistency/privacy-and-billing#billing).

### Example Request

```bash
JOB=0b8f6a52-3c1d-4e7a-9f55-2d7c1e9a4b10

until body=$(curl -sS "https://gateway.trymighty.ai/v1/consistency/jobs/$JOB" \
    -H "Authorization: Bearer $MIGHTY_API_KEY") &&
  echo "$body" | jq -e '.result or (.state == "delivered" or .state == "partial" or .state == "abandoned")' >/dev/null
do
  sleep 5
done
echo "$body" | jq '.state, .result.findings'
```

### AI-Agent Prompt

### Poll a consistency job

```text
Poll GET /v1/consistency/jobs/{job_id} (Preview) after POST /v1/consistency/packets returns 202.

- Send Authorization: Bearer <API key>.
- Wait the Retry-After seconds (5) between polls.
- Stop when "result" is present or state is delivered, partial, or abandoned.
- partial: read result and show that coverage is incomplete.
- abandoned: no result and no charge; resubmit with a new Idempotency-Key.
- 404 job_not_found: do not retry.
- 503: retry after Retry-After seconds.
- Store result.evidence_package_ref and result.provenance with the case.
- To replay, poll again or resend the same request with the same Idempotency-Key. Never reuse a key for a different body.

Acceptance criteria:
- Tests cover queued then delivered, partial, abandoned, 404 job_not_found, and 503 with Retry-After.
```
