Templates Admin API (v0)
Download OpenAPI specification:Download
Preview_template
Renders an existing template with the provided data and returns the output.
Use this method to test the render_template
RPC procedure during development.
path Parameters
template required | string The ID of the template. To retrieve the ID, use the List templates method. |
Request Body schema: application/json
template_id required | string The id of the template. |
data required | object The data to feed to the template. |
locale | string The locale used to select the template according to language and region. Example: en_DE, de_DE, english, EN etc. |
content_type | string Default: "text" Enum: "html" "text" "pdf" The format of the generated content. |
Responses
Request samples
- Payload
Content type
application/json
{- "template_id": "packing_slip",
- "data": {
- "name_var": "John Doe",
- "phonenum_var": "202-555-0109"
}, - "locale": "en_US",
- "content_type": "html"
}