Documents

Get Document Status

Check the upload status of a document.

Use this endpoint to monitor the progress of a document upload after receiving its document_id from the upload endpoint. The status indicates whether the document is still being uploaded, has completed successfully, or has failed.

Args: document_id: Document ID returned from the upload endpoint (path parameter)

Returns: dict: Upload status information containing: - status: Current upload status ("QUEUED", "PROCESSING", "READY", "FAILED") - document_id: Document ID once upload is COMPLETED (null if still uploading) - created_at, completed_at, updated_at: timestamps - progress, eta_seconds: not wired up yet, always null

Raises: - 404: If the document is not found or doesn't belong to the user

Example: Request: GET /api/v3/documents/{document_id}/status Headers: {"Authorization": "Bearer <api_key>"} Response: { "status": "READY", "document_id": "document_01k4x9m2p7q3r5sa", "created_at": "2024-01-15T10:30:00Z", "completed_at": "2024-01-15T10:31:00Z", "updated_at": "2024-01-15T10:31:00Z", "progress": null, "eta_seconds": null }

get/api/v3/documents/{document_id}/status

Request

  • Base URL
    https://api.nugen.in
  • Auth
    HTTP bearer

Path parameters

document_idstring required

ID of the document, returned when it was uploaded

Response

Returns the processing status for a document upload: QUEUED, PROCESSING, READY or FAILED, with the document_id once READY, and timestamps.

status'QUEUED' | 'PROCESSING' | 'READY' | 'FAILED' | 'STOPPED' required

Lifecycle status of a resource that runs asynchronously. Stored as is and returned as is, with no translation in between.

  • QUEUED: accepted and waiting for its workflow to start
  • PROCESSING: running
  • READY: finished successfully
  • FAILED: failed at any stage
  • STOPPED: stopped by the user before completion
document_idstring nullable

Document ID once the upload is READY; null while still uploading or if failed

created_atstring date-time nullable

Timestamp when the document was created

completed_atstring date-time nullable

Timestamp when processing completed; null while still running

updated_atstring date-time nullable

Timestamp of the last status change

progressnumber nullable

Completion progress, 0.0 to 100.0. Not wired up yet, always null.

eta_secondsinteger nullable

Estimated time remaining in seconds. Not wired up yet, always null.

Example response

{
  "completed_at": "2024-01-15T10:31:00Z",
  "created_at": "2024-01-15T10:30:00Z",
  "document_id": "document_01k4x9m2p7q3r5sa",
  "status": "READY",
  "updated_at": "2024-01-15T10:31:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.