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": "<unknown>"
}Renders a document body from a template slug and variables and returns the JSON content. Variables can be strings or arrays of objects for table data.
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": "<unknown>"
}The slug of the template to use.
Variables for the template. Accepts strings, arrays of objects for tables, or nested templates via { type: 'template', slug, variables }.
Successfully rendered document body.
Successfully rendered document body.
The rendered document body.