POST /classification

Create a document type classification request. This allows you to specify the files you would like to classify. Multiple files can be specified in a single request. Due to the asynchronous nature of processing classifications, the results for each of these files will be returned independently. Thus the endpoint will return a number of classification identifiers (request_id) which will be then used to retrieve the results for each file.

Headers

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

Parameters

  • file_ids Body Required

    the identifiers for the documents to have classification performed

Code Sample
curl -X POST -H "Accept: application/json"  
-H "Authorization: Bearer <token>" 
-H "Content-Type: application/json"  
-d "{"file_ids": ["<file_id"]}" 
https://<base_url>/api/v2/classification
classification_jobs, _ = zdai.classification.create(file_ids = ['file_id_1', '...'])
Response Codes
  • 202 Accepted
    Classification has been created successfully.
  • 400 Bad Request
    Malformed request body, or file_id is missing.
  • 403 Forbidden
    Invalid or missing authentication token.
  • 404 Not Found
    The file specified does not exist.
  • 500 Internal Server Error
    Something went wrong unrelated to the users request.

Response Data

  • file_id

    the file ID for the document being classified

  • status

    the status for the classification: queued or failed

  • request_id

    the request to be used to return the classification for the file

Response
{
    "file_ids": [
        {
            "file_id": "<file_id>",
            "status": "queued",
            "request_id": "<request_id>"
        }
    ]
}

Need Help?

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

Contact us at support@zuva.ai