GET /classification/{request_id}

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

Headers

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

Parameters

  • request_id Path Required

    the classification request to return result for. This is the classification identifier returned from a successful POST /classification 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/classification/<request_id>
classification_status, _ = zdai.classification.get(request_id = 'request_id')
Response Codes
  • 200 OK
    The response successfully returned
  • 403 Forbidden
    Invalid or missing authentication token.
  • 404 Not Found
    The classification 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 classification failed and there is an error message.

Response Data

  • request_id

    the identifier for the classification requested

  • file_id

    the id of the document classified

  • classification

    classification for that document

  • is_contract

    boolean response if the document being classified is a contract

  • status

    the status of the request

  • error

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

Response
{
    "file_id": "<file_id>",
    "status": "complete",
    "request_id": "<request_id>",
    "classification": "Real Estate Agt",
    "is_contract": true
}

Need Help?

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

Contact us at support@zuva.ai