Python
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.create_from_splits(
document={
"id": "id",
"file_name": "fileName",
},
splits=[0],
)
print(response.created_documents){
"createdDocuments": [
{
"id": "<string>",
"fileName": "<string>",
"startPageInclusive": 123,
"endPageInclusive": 123
}
]
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Document
Create documents from splits
Creates new documents from specified page splits of an existing document.
POST
/
api
/
v2
/
documents
/
create-from-splits
Python
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.create_from_splits(
document={
"id": "id",
"file_name": "fileName",
},
splits=[0],
)
print(response.created_documents){
"createdDocuments": [
{
"id": "<string>",
"fileName": "<string>",
"startPageInclusive": 123,
"endPageInclusive": 123
}
]
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
Response
Successfully created new documents from splits.
An array of newly created document resources from the splits.
Show child attributes
Show child attributes