Workflow-run
Task
Document
- GETDocument metadata
- GETFull document details
- GETDocument CSV content
- POSTUnzip file and return PDFs
- POSTGenerate CSV document
- POSTPresigned URL for upload
- POSTClassify document (async)
- POSTSplit document (async)
- POSTCreate documents from splits
- POSTLegacy extract document (async)
- POSTDocument extraction (async)
- POSTRender document body
- POSTGenerate document from template (async)
- POSTTransform JSON to HTML
- POSTDocument reasoning (async)
- POSTSearch across documents
Async-result
Communication
Clearinghouse
Ledger
Integration - Snowflake
Document
Classify document (async)
Initiates an asynchronous document classification process based on provided schemas. Returns an ID to track the async result.
POST
/
api
/
v2
/
documents
/
classify
Copy
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.classify(
document={
"id": "id",
"file_name": "fileName",
},
label_schemas=[{
"label": "label"
}],
)
print(response.async_result_id)
Copy
{
"asyncResultId": "<string>"
}
Body
application/json
Response
202
application/json
Accepted. Document classification process initiated.
Copy
import os
from samplehc import SampleHealthcare
client = SampleHealthcare(
api_key=os.environ.get("SAMPLEHC_API_KEY"), # This is the default and can be omitted
)
response = client.v2.documents.classify(
document={
"id": "id",
"file_name": "fileName",
},
label_schemas=[{
"label": "label"
}],
)
print(response.async_result_id)
Copy
{
"asyncResultId": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.