GET /ocr/{request_id}

Retrieve an OCR status. This endpoint allows the status of the OCR request to be checked based on the OCR identifier (request_id). Each of the OCR IDs should be checked individually before their results are retrieved. The status process is queued, processing, complete, or failed.

Headers

Authorization (required) - Requires the standard authentication header used in the system.

Parameters

  • request_id Path Required

    the OCR request to query status. This is the OCR identifier returned from a successful POST /ocr response (request_id)

Code Sample
curl -X GET -H "Accept: application/json"
-H "Authorization: Bearer <token>"
-H "Content-Type: application/json"  
-d "{}" https://<base_url>/api/v2/ocr/<request_id>
ocr, _ = zdai.ocr.get(request_id = 'request_id')
Response Codes
  • 200 OK
    The response successfully returned
  • 403 Forbidden
    Invalid or missing authentication token.
  • 404 Not Found
    The OCR request does not exist or has been cleaned up.
  • 500 Internal Server Error
    Something went wrong unrelated to the users request.

Response Data

  • request_id

    the identifier from the request. For each request_id the status will be returned

  • file_id

    the identifier for the OCR document

  • status

    the status of a the request. Could be queued, processing, or complete

  • error

    if an error occurs, you may get a standard error response

Response
{
    "request_id": "<request_id>",
    "file_id": "<file_id>",
    "status": "complete"
}

Need Help?

Couldn’t find the information you were looking for or need more assistance?

Contact us at support@zuva.ai