# Render template HTML `POST /api/v1/templates/{id}/parse` Renders the stored template HTML using request values. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Templates → Write**. ## Path parameters - `id` (integer, required) — ID of the template. ## Body parameters - `athlete_id` (integer) — Use an athlete ID to populate the athlete variables. - `context` (string) — Use athlete_print to require a valid athlete and fail if any template variables remain unresolved. - `additional properties` (map values) — Send template variables as top-level properties. The JSON body takes precedence over form or query values. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/templates/${ID:?Set ID}/parse" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"first_name":"Alex"}' ``` ## Response **200 OK** Returns the rendered fragment in `html`. Page templates also return a complete HTML document in `document_html` and any CSS in `style_css`. Example with fictional data and selected fields. ```json { "status": "success", "template_id": "27", "html": "
Hello Alex, practice starts at 18:00.
", "style_css": null, "document_html": "Hello Alex, practice starts at 18:00.
" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The template, body, or stylesheet could not be processed. - `404` — The requested record was not found. - `422` — The athlete print context is invalid or variables could not be resolved.