Skip to main content
POST
/
api
/
v2
/
documents
/
templates
/
render
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v2.documents.templates.render_document(
    slug="slug",
    variables={
        "foo": {
            "slug": "slug",
            "type": "template",
            "variables": {
                "foo": "bar"
            },
        }
    },
)
print(response.body)
{
  "body": "<any>"
}

Body

application/json
slug
string
required

The slug of the template to use.

variables
object
required

Variables for the template. Accepts strings, arrays of objects for tables, or nested templates via { type: 'template', slug, variables }.

Response

Successfully rendered document body.

body
any

The rendered document body.

I