Declaration Templates (Admin)

Create Template

Create a new template.

Body: name: str (required) id_modulo: int (required) template_type: str (optional, default 'html' — 'html' or 'pdf') design_json: dict (preferred for html — block-based editor output) html_content: str (legacy — required if design_json absent for html type) css_content: str (optional) tipo_doc: int (optional) trigger_action: str (optional) pdf_template_url: str (required for pdf type — S3 URL of fillable PDF)

post/api/declaration-templates

Headers

x-api-tokenstring nullable

Request body

object required

Response

Successful Response

{"stackTrail":"paths:/api/declaration-templates:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes