Job
ConceptsA job is an asynchronous processing unit in DocLD. When you upload a document or run extraction, a job is created and returns an ID. You poll the job endpoint or use a webhook to know when processing is complete and to retrieve results.
When Jobs Are Created
| Operation | Job Type | What It Tracks |
|---|---|---|
| Document upload | Parsing job | Parsing, chunking, embedding |
| Extraction | Extraction job | Schema-based extraction |
| Batch upload | Multiple jobs | One job per document |
Jobs run asynchronously. The API returns immediately with a job ID; processing happens in the background.
Job Lifecycle
- Created — Job is created when you submit a document or extraction request
- Queued — Job enters a processing queue
- Running — Parsing, chunking, embedding, or extraction runs
- Completed — Results are available; webhook fires if configured
- Failed — Error occurred; job status includes error details
Poll the job endpoint to check status. Alternatively, register a webhook for completion events.
Job API
# Poll job status GET /api/jobs/{job_id} # Response includes status, progress, and results when complete
For batch processing, each document gets its own job. You can track multiple jobs and correlate them with your batch.
Best Practices
- Use webhooks — Avoid polling; register a webhook for job completion
- Handle failures — Some jobs may fail (e.g., unsupported format, extraction error); retry or alert as needed
- Store job IDs — Persist job IDs in your system to correlate results with your records
Related Concepts
Jobs track parsing and extraction processing. Webhooks notify you when jobs complete. Batch processing creates multiple jobs per run.