Skip to main content
POST
/
api
/
v2
/
documents
/
templates
/
generate-document
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.documents.templates.generate_document_async(
    slug="slug",
    type="document",
)
print(response.async_result_id)
{
  "asyncResultId": "<string>"
}

Body

application/json

The request body, discriminated by the 'type' field ('document' or 'pdf').

  • Option 1
  • Option 2
type
enum<string>
required
Available options:
document
slug
string
required

The slug of the template to use.

documentBody
any

The body of the document.

fileName
string

The name of the file to save.

Response

Default Response

asyncResultId
string
required

The ID to track the asynchronous document generation task.

I