Skip to main content

Jobs & Results

Every upload creates a job. Single uploads return their result inline, but you can always re-fetch a result, check status (essential for bulk jobs), list past jobs, and download the original file.

Base path: /ocr


Check job status

GET /ocr/jobs/{job_id}/status

Returns the real-time processing status and progress for a job. Use this to poll bulk jobs to completion.

curl "https://netraocr.shivicx.com/api/v1/ocr/jobs/8f3c…/status" \
-u "ak_live_xxxxxxxx:sk_live_xxxxxxxx"

Response 200 OK

{
"job_id": "8f3c…",
"document_id": "doc_…",
"batch_id": "batch_…",
"status": "processing",
"progress": 60,
"created_at": "2026-06-16T10:30:00Z",
"updated_at": "2026-06-16T10:30:04Z",
"message": "Extracting fields",
"error": null,
"processing_time_ms": null,
"coins_consumed": 0,
"fraud_coins_consumed": 0
}
statusMeaning
queuedAccepted, waiting to start
processingCurrently being processed
completedDone — fetch the result
failedFailed — see error
Polling

Poll every 2–5 seconds with backoff. Stop when status is completed or failed. For real-time updates without polling, contact us about streaming options.


Get a job result

GET /ocr/jobs/{job_id}/result

Returns the full OCR result for a completed job — the same payload returned inline by /ocr/upload.

curl "https://netraocr.shivicx.com/api/v1/ocr/jobs/8f3c…/result" \
-u "ak_live_xxxxxxxx:sk_live_xxxxxxxx"

Result fields

FieldTypeDescription
job_idstringJob identifier
filenamestringOriginal filename
batch_idstring|nullParent batch, for bulk jobs
structured_dataobject|nullTyped fields from the selected template
page_countinteger|nullPages processed
document_typestring|nullDetected type (e.g. invoice)
average_confidencenumber|nullMean extraction confidence
pagesarray|nullPer-page detail
processing_time_msinteger|nullProcessing duration
created_at / completed_atstring|nullTimestamps
document_url / result_urlstring|nullConvenience links
fraud_check_enabledbooleanWhether an integrity check was requested
fraud_check_statusstring|nullpending / processing / completed / failed
coins_consumednumberUsage charged for this job

List jobs

GET /ocr/jobs

Lists your jobs (most recent first), with pagination and filtering.

curl "https://netraocr.shivicx.com/api/v1/ocr/jobs?limit=20" \
-u "ak_live_xxxxxxxx:sk_live_xxxxxxxx"

Common query parameters include limit, offset, and status_filter. The response is a list of job summaries you can drill into with Get a job result.


Download the original document

GET /ocr/jobs/{job_id}/download

Streams back the original uploaded file for a job while it is retained. Uploaded originals, structured results, and metadata are kept for 30 days only for history and log keeping, then deleted completely.

curl "https://netraocr.shivicx.com/api/v1/ocr/jobs/8f3c…/download" \
-u "ak_live_xxxxxxxx:sk_live_xxxxxxxx" \
-o original.pdf

Working with batches

Bulk uploads group jobs into a batch. Each job carries the batch_id, so you can:

  1. Submit with POST /ocr/bulk-upload.
  2. Poll GET /batches/{batch_id} for folder-level progress.
  3. Poll individual jobs with /ocr/jobs/{job_id}/status when you need per-file status.
  4. Fetch each completed job's /result.

See OCR → Bulk processing and Batches.