GET /v1/jobs/:id
Poll the status of an extraction job. Once status is completed, the full extracted data is included in the response.
Request
Headers
| Header | Required | Description |
|---|
X-API-Key | Yes | Your Parzo API key |
Path parameters
| Parameter | Description |
|---|
id | The job_id returned by POST /v1/extract/invoice |
Example request
curl https://api.parzo.dev/v1/jobs/3419ae1e-93c3-48a1-95ac-833c390f9916 \
-H "X-API-Key: inv_your_key_here"
Responses by status
{
"job_id": "3419ae1e-93c3-48a1-95ac-833c390f9916",
"status": "pending",
"queued_at": "2026-04-01T10:00:00.000Z",
"started_at": null,
"completed_at": null,
"processing_ms": null
}
{
"job_id": "3419ae1e-93c3-48a1-95ac-833c390f9916",
"status": "completed",
"queued_at": "2026-04-01T10:00:00.000Z",
"started_at": "2026-04-01T10:00:01.000Z",
"completed_at": "2026-04-01T10:00:02.000Z",
"processing_ms": 942,
"confidence": 0.95,
"model": "claude-haiku-4-5",
"cache_hit": false,
"validation_flags": [],
"result": { ... }
}
{
"job_id": "3419ae1e-93c3-48a1-95ac-833c390f9916",
"status": "failed",
"error": "Unable to extract text from document",
"attempt_count": 3
}
Polling strategy
Poll every 3-5 seconds. Jobs typically complete in 5-30 seconds.
import requests
import time
def wait_for_result(job_id, api_key, timeout=120):
url = f"https://api.parzo.dev/v1/jobs/{job_id}"
headers = {"X-API-Key": api_key}
for _ in range(timeout // 5):
response = requests.get(url, headers=headers).json()
if response["status"] == "completed":
return response["result"]
if response["status"] == "failed":
raise Exception(response["error"])
time.sleep(5)
raise TimeoutError("Job did not complete in time")
Validation flags
When Parzo detects potential issues in the extracted data, it adds flags to validation_flags:
| Code | Severity | Description |
|---|
ARITHMETIC_MISMATCH | error | subtotal + tax ≠ total |
INVALID_TOTAL | error | Total is zero or negative |
INVALID_IT_VAT_RATE | warning | VAT rate not standard for Italy |
INVALID_PIVA_CHECKSUM | warning | Italian VAT number fails checksum |
DATE_INCOHERENCE | warning | Issue date is after due date |
Validation flags do not block the extraction — you always receive the result. Use flags to decide whether to flag the document for manual review.