Skip to content
Developer

FlexibleLatexTemplate

System and settings4 EndpointsLatex / FlexibleLatexTemplate

Everything the template editor needs: data types for the class dropdown, the id rules, the AI marker syntax and which AI features are available on this server.

GET/api/templates/flexible_latex_template_tools/editor_meta

Responses

200Editor meta data of flexible templates

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/templates/flexible_latex_template_tools/editor_meta \
  --header 'x-iw-jwt-token: <TOKEN>'

Validates an id for a new template and suggests a free id (from the name or the duplicated template).

GET/api/templates/flexible_latex_template_tools/id_check

Query parameters

idstringID to validate
namestringTemplate name the suggestion is built from
base_idstringID of the duplicated template

Responses

200Validation result and suggestion

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/templates/flexible_latex_template_tools/id_check \
  --header 'x-iw-jwt-token: <TOKEN>'

Runs the template check ("Prüflauf") for the posted, not yet saved template state: Twig syntax, rendering with a minimal and a maximal data set of the data type and the PDF rendering.

POST/api/templates/flexible_latex_template_tools/check

Fields that are not posted are taken from the saved template with the same id.

Query parameters

render_pdfbooleanfalse skips the PDF rendering (default true)

Responses

200Check report

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/templates/flexible_latex_template_tools/check \
  --header 'x-iw-jwt-token: <TOKEN>'

Creates a template proposal from a PDF / image upload or a web page via OCR + AI. The result is not saved, the editor opens it like a duplicated template.

POST/api/templates/flexible_latex_template_tools/ai_import

Request body multipart/form-data

  • filestring (binary)

    PDF or image (PNG / JPG)

  • urlstring

    Web page to convert instead of a file

  • render_typestring

    latex or html

  • tagstring

    Data type of the template (reference class key)

  • namestring

    Name of the new template

  • hintstring

    Additional instructions for the AI

Responses

200Template proposal with check report

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/templates/flexible_latex_template_tools/ai_import \
  --header 'content-type: multipart/form-data' \
  --header 'x-iw-jwt-token: <TOKEN>' \
  --form file='@datei.pdf'