Skip to main content
POST
/
api
/
v2
/
documents
/
create-from-splits
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
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
    }
  ]
}

Body

application/json
splits
number[]
required

Array of page numbers indicating where to split the document. Each number is the start of a new document segment.

document
object
required

The source document from which to create new documents based on splits.

Response

Successfully created new documents from splits.

Successfully created new documents from splits.

createdDocuments
object[]
required

An array of newly created document resources from the splits.