GET /ocr/{request_id}/text

Retrieves the text of a document from OCR results after processing has completed. The result is the text string which represents the OCR text from the document respectively.

Headers

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

Parameters

  • request_id Path Required

    the OCR request to return the document text. 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>/text
ocr, _ = zdai.ocr.get_text(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, has been cleaned up, or not finished.
  • 500 Internal Server Error
    Something went wrong unrelated to the users request or the OCR failed and there is an error message.

Response Data

  • request_id

    the id used in the GET /ocr request

  • text

    the text for the document being OCR’d

  • error

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

Response
{
    "request_id": "<request_id>",
    "text": "Exhibit ... "
}

Need Help?

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

Contact us at support@zuva.ai