Skip to main content
POST
/
api
/
v2
/
documents
/
classify
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.documents.classify(
    document={
        "id": "id",
        "file_name": "fileName",
    },
    label_schemas=[{
        "label": "label"
    }],
)
print(response.async_result_id)
{
  "asyncResultId": "<string>"
}

Body

application/json
document
object
required

The document to be classified.

labelSchemas
object[]
required

An array of label schemas to classify against.

Response

Accepted. Document classification process initiated.

Accepted. Document classification process initiated.

asyncResultId
string
required

The ID to track the asynchronous classification task.