POST
/
api
/
v2
/
documents
/
templates
/
generate-document
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.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').

Response

202
application/json

Default Response

The response is of type object.