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.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.
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.render_document(
slug="slug",
variables={
"foo": {
"slug": "slug",
"type": "template",
"variables": {
"foo": "bar"
},
}
},
)
print(response.body){
"body": "<unknown>"
}Successfully rendered document body.
Successfully rendered document body.
The rendered document body.