The Get Classification Job Status endpoint allows you to check the current status of classification jobs and retrieve the final results once processing is complete. Classification jobs process documents asynchronously, uploading files to cloud storage and analyzing them in the background.
Classification jobs are stored in Supabase and updated in real-time. Status checks are lightweight and can be polled frequently to monitor progress.
Job is currently being processed. This includes file upload to storage, document analysis, and classification processing. Progress messages will indicate the current stage.
completed
Job has completed successfully. The result field contains the classification results with confidence scores and page-by-page details.
failed
Job failed during processing. The error field contains details about what went wrong. Common causes include file corruption, invalid conditions, or processing errors.
{ "job_id": "47c536aa-9fab-48ca-b27c-2fd74d30490a", "status": "failed", "progress": "Classification failed", "error": "Failed to process PDF: File appears to be corrupted", "result": null}
Invalid Conditions Error
Copy
{ "job_id": "47c536aa-9fab-48ca-b27c-2fd74d30490a", "status": "failed", "progress": "Classification failed", "error": "Invalid conditions format. Must be a valid JSON string.", "result": null}
Storage Error
Copy
{ "job_id": "47c536aa-9fab-48ca-b27c-2fd74d30490a", "status": "failed", "progress": "Classification failed", "error": "Failed to upload file to storage. Please try again.", "result": null}
Polling Frequency: Use exponential backoff when polling job status to avoid overwhelming the API. Start with 1-second intervals and increase gradually.
Timeout Handling: Set reasonable timeouts for classification jobs. Most jobs complete within 30-60 seconds, but complex multi-page documents may take longer.
Error Recovery: Implement retry logic for transient errors and provide fallback handling for permanent failures.
Result Caching: Once a job is completed, cache the results to avoid unnecessary API calls for the same job ID.
Rate Limits: Status checking endpoints have rate limits. Implement proper backoff strategies to avoid hitting limits.
Job Retention: Classification jobs and their results may be automatically cleaned up after a certain period. Check with your service provider for retention policies.