TemplateCreate
html is required for pdf and image templates. Fields not named here are ignored.
Possible values: non-empty and <= 200 characters
Lowercase letters, digits and dashes, 1 to 64 of them, starting and ending with a letter or digit. New in the workspace.
Possible values: non-empty and <= 64 characters, Value must match regular expression ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$
invoice-deUp to 2,000 characters.
Possible values: <= 2000 characters
pdf and image templates are HTML; docx and pptx templates are Word and PowerPoint files with tags in their text, rendered live from the Starter plan on (test renders on Free produce the marked PDF only).
Possible values: [pdf, image, docx, pptx]
The template language: Jinja2 (Nunjucks), Liquid or Handlebars.
Possible values: [jinja2, liquid, handlebars]
The body markup in the template language, up to 2 MB.
Possible values: <= 2097152 characters
The stylesheet, up to 1 MB.
Possible values: <= 1048576 characters
Extra markup for <head>, such as font links; up to 256 kB.
Possible values: <= 262144 characters
settings object
Rendering settings. A request's settings are deep-merged over the template's, which are merged over the defaults: only the keys you send change, and a section set to null (such as footer: null) is removed. The settings reference explains each key with examples.
paper object
PDF page size. Defaults to A4 portrait.
A0 to A6, Letter, Legal, Tabloid or Ledger; A4 by default. Ignored when width and height are set.
A4Custom page width as a CSS length; needs height too.
100mmCustom page height as a CSS length; needs width too.
150mmfalsemargin object
Page margins as CSS lengths; 20mm top and bottom and 15mm left and right by default. Header and footer are drawn inside the top and bottom margin.
20mm15mm20mm15mmheader objectnullable
Printed across the whole page width inside the top margin; null removes the template's.
Markup of the running header, rendered with the template's language and data. Elements with the classes pageNumber and totalPages show the page numbers.
Height of the header box as a CSS length.
CSS padding inside the header box; 0 for designs that run edge to edge.
0 10mmfooter objectnullable
Printed across the whole page width inside the bottom margin; null removes the template's.
Markup of the running footer, rendered like the header.
Height of the footer box as a CSS length.
CSS padding inside the footer box; 0 for designs that run edge to edge.
0 10mmPrint background colours and images.
trueScales the page content, from 0.1 to 2.
1Let @page rules in the CSS decide the page size instead of paper.
falseKeep only these pages of a PDF; empty keeps all. The page count, the plan's page limit and the units count the pages that are kept.
1-3, 5waitFor object
When the page counts as loaded, before it is printed or captured.
networkIdle object
auto waits for the load event, the fonts and the requests still running, and for half a second of network idle only on a URL or a document with scripts of its own. true always waits for that half second, false never does.
- boolean
- string
Wait until an element matching this CSS selector exists and is visible.
nullA JavaScript expression or function, evaluated in the page every 50 ms until its value is truthy: a function is called, a promise counts by what it resolves to, and an error counts as not yet. It shares timeoutMs with selector, which is waited for first. Still false then, the render fails with render_timeout, whose detail names the last error; text that is not JavaScript fails it at once with 400 invalid_request.
Possible values: <= 4096 characters
null() => window.chartsReady === trueHow long to wait for selector and function together, in milliseconds, at most 30,000; then the render fails with render_timeout.
Possible values: >= 0
5000An extra pause after everything else, in milliseconds; a value above 10,000 counts as 10,000.
Possible values: >= 0
0Compile the Tailwind utility classes the document uses, for templates and plain html alike.
falsepdf object
PDF output only: what the file says about itself, and its structure for assistive technology.
metadata object
The document properties. The title is what a PDF reader shows in its title bar and a screen reader announces first; PDF/UA-1 requires one.
Rendered with the data like the template, so it may use template expressions. Applies to stored templates, to html with an engine and to markdown, where it comes before the front matter's title and the first heading; a plain html or url render ignores it, so give such a page a <title> instead.
Rechnung {{ invoice.number }}Rendered with the data like title for stored templates, html with an engine and markdown with an engine; written as given for plain html, url, markdown without an engine and Word and PowerPoint templates. A Markdown document's front matter fills it where the settings leave it empty.
Fennlor Studio GmbHRendered like author.
Rendered like author, as one text; left out of the file when it comes out empty.
Writes the structure tree (headings, lists, tables, links) a screen reader reads the document by.
falseWrites bookmarks from the headings.
falseua objectnullable
Makes the file a PDF/UA-1 document (ISO 14289-1): tagged, repaired where the browser's output breaks the standard, and held against veraPDF's machine-checkable rules of PDF/UA-1. true is { "check": "strict" }. The render carries the verdict as accessibility, and the file names itself PDF/UA-1 only when it passed. A passed check does not make a document accessible: alternative texts, reading order and contrast are in the template. Cannot be combined with post.merge_after, and is not available for Word and PowerPoint templates; each answers 400 invalid_request. With an e-invoice the file is a PDF/A-3b and a PDF/UA-1 document at once: both are checked in the file that is delivered, and the render carries both reports. false in a request switches off what the template declares. Asked for by a request whose output is an image, it answers 400 too; declared by an image template it is ignored. No plan limit and no extra unit.
- boolean
- PdfUaOptions
pdfa objectnullable
Makes the file a PDF/A file (ISO 19005) for archiving: "2b" for PDF/A-2b, "3b" for PDF/A-3b, and true for "3b". The finished PDF is converted and held against veraPDF's rules of that level; the render carries the verdict as pdfa, and a file that fails is not delivered (422 pdfa_validation_failed, with the report). A merge, a watermark, the test mark, pdf.ua and Word and PowerPoint templates go with it. A password does not, since PDF/A forbids encryption, and an e-invoice is a PDF/A-3b already, so "2b" beside one is refused; each answers 400 invalid_request. PDF/A is a file format: whether an archive meets a law such as the GoBD depends on how it is run, not on the file. false in a request switches off what the template declares. Asked for by a request whose output is an image, it answers 400 too; declared by an image template it is ignored. Every plan, and no extra unit.
- boolean
- string
image object
Image output (png, jpg, webp): the browser window the page is captured in.
Window width in CSS pixels; 1200 by default.
1200Window height in CSS pixels; 630 by default.
630Pixel density: 2 makes a 1200 × 630 window a 2400 × 1260 image.
2Output of an image template when the request names no output. jpg is accepted as well.
Possible values: [png, jpeg, webp]
JPEG and WebP quality; 90 by default.
Possible values: >= 1 and <= 100
Capture the whole height of the page instead of the window.
falseTransparent background (PNG).
falseCSS selector of one element to capture instead of the window; the first match counts. When none appears within 30 seconds, the render fails with render_timeout.
nulloffice object
Word and PowerPoint templates. Page setup, margins, headers and footers come from the document; the Chromium settings above do not apply.
Output when the request names none; the template's own format without it.
Possible values: [docx, pptx, pdf]
BCP 47 tag that formats dates and numbers, picks the translation dictionary and sets <html lang>; en-GB by default.
de-DEIANA time zone for dates; Europe/Berlin by default.
Europe/BerlinISO 4217 code the money helper uses when none is given; EUR by default.
EURmarkdown objectnullable
How a markdown render looks and what raw HTML in its text does. Refused beside any other source, a template's included, and a stored template's settings.markdown is never read. The block is strict: an unknown key or a value that does not exist answers 400 invalid_request with its field, so a typo never prints the document in another look.
document sets headings, text, tables, code and quotes in the fonts the renderer has, and in the brand kit's fonts and primary colour where the organisation has one. none is the print reset alone, for a look of your own in css.
Possible values: [document, none]
documentsafe shows raw HTML in the text as text, keeps <br> and a few formatting tags without attributes (sup, sub, kbd, mark, u, ins, del, s, small) and removes HTML comments. allow writes raw HTML as it stands, scripts included, as an html render does: for Markdown you wrote yourself. In both, links keep http, https, mailto, tel, relative addresses and anchors (an address with any other scheme makes no link, and its text stays), and pictures http, https, relative addresses (a file of the workspace library by name) and data:image/ in PNG, JPEG, GIF, WebP and SVG.
Possible values: [safe, allow]
safeA single line break becomes a line break in the document, as in a chat. Off by default, as in GitHub Flavored Markdown, where a paragraph ends at an empty line.
falseA fenced code block whose info string names a language (ts, python) is coloured by highlight.js, in the document theme's colours; false prints code in the text's colour. A fence without a language, or with one highlight.js does not take, prints plain, and nothing is guessed. The languages are highlight.js's common set (Bash, C, C++, C#, CSS, Diff, Go, GraphQL, INI and TOML, Java, JavaScript, JSON, Kotlin, Less, Lua, Makefile, Markdown, Objective-C, Perl, PHP and PHP templates, Python and Python sessions, R, Ruby, Rust, SCSS, shell sessions, SQL, Swift, TypeScript, VB.NET, WebAssembly, XML and HTML, YAML) and Dockerfile and nginx, by their names and aliases (ts, sh, yml, html). A document colours its first 256 kB of code; a block over 100 kB, or with a line over 1,000 characters, prints plain. The classes are highlight.js's own (hljs-keyword), so the none theme with css takes any highlight.js stylesheet.
trueFormulas are typeset by KaTeX: $…$ and $`…`$ in a line, $$…$$ on lines of their own, and fenced blocks whose language is math. A $ opens a formula only before a character that is no space, and closes one only after such a character and not before a digit, so $5 and $10 stays text; \$ is a dollar sign. Off by default, because a $ in a business document is usually money. A formula is at most 4 kB of TeX, and a document holds at most 1,000 formulas and 256 kB of TeX in all. A formula that does not parse, uses a command that would link, load or write HTML (\href, \url, \includegraphics, \htmlClass), or is past a limit fails the render with markdown_syntax_error, which names its line. \gdef defines a macro for the rest of the document. In a PDF/UA-1 file each formula is a Formula whose alternative text is its TeX.
falseA fenced block whose language is mermaid is drawn by Mermaid (flowcharts, sequences, states, classes, entities, Gantt charts, pies and the other kinds Mermaid draws), in the document's font, with the brand kit's primary colour on borders where the organisation has one. Off by default, because Mermaid is a large script that runs on the text. Labels are text, links and clicks are off. A document holds at most 50 diagrams of 50 kB each, and Mermaid takes at most 500 edges a diagram. A diagram that cannot be drawn fails the render with markdown_syntax_error, which names its line; drawing takes the render's time like anything else in the page, so a document of very large diagrams can answer render_timeout. Give each diagram accTitle (and accDescr): they are its name, which a PDF/UA-1 file needs.
falseA stylesheet that comes after the theme, at most 256 kB. The converter writes the document into <div class="ff-markdown">.
Possible values: <= 262144 characters
einvoice objectnullable
Makes the template an invoice template: every PDF rendered from it is a ZUGFeRD / Factur-X e-invoice built from the _invoice block of the data, as if the request said post.einvoice. A request's settings.einvoice and post.einvoice merge over it field by field; post.einvoice: false switches it off for one request. Image output of the same template is not affected. false in a request switches off what the template declares.
- EinvoiceOptions
- boolean
What kind of e-invoice a render makes. Every field has a default, so {} asks for a Factur-X invoice in the EN 16931 profile.
en16931 carries every field of the European standard; basic is the smallest profile that is an invoice on its own. Any other profile answers 422 einvoice_profile_unsupported.
Possible values: [basic, en16931]
en16931ZUGFeRD and Factur-X are one specification under two names, and the file is the same. The choice decides the name and release the render reports (Factur-X 1.09 or ZUGFeRD 2.5).
Possible values: [factur-x, zugferd]
factur-xboth stores the XML as a file of its own beside the PDF, kept and deleted with it; the render links it as einvoice.xml_url. A test render on a plan without e-invoices (Free) keeps no such file: it delivers the marked PDF alone, and xml_url is null.
Possible values: [embedded, both]
embeddedWhat happens when the PDF does not show a value of the XML (the invoice number, the totals): warn reports it in einvoice.display.missing, strict fails the render with 422 einvoice_display_mismatch.
Possible values: [warn, strict]
warndesign object
The visual editor's layers of an image template, stored with a version. Authoring data only: renders use the version's HTML and CSS, which the editor writes from it, and a render request's design is ignored. Kept as it is when you copy a version; at most 256 kB. See the visual editor guide.
The visual editor's layers of an image template, stored with a version. Authoring data only: renders use the version's HTML and CSS, which the editor writes from it, and a render request's design is ignored. Kept as it is when you copy a version; at most 256 kB. See the visual editor guide.
Rendering settings. A request's settings are deep-merged over the template's, which are merged over the defaults: only the keys you send change, and a section set to null (such as footer: null) is removed. The settings reference explains each key with examples.
sample_data object
Data the editor previews with, and from which a schema is inferred where none is stored. Never used by an API render.
Data the editor previews with, and from which a schema is inferred where none is stored. Never used by an API render.
data_schema objectnullable
JSON Schema of data, which validate_data, the schema check of publishing and the integrations' fields use.
JSON Schema of data, which validate_data, the schema check of publishing and the integrations' fields use.
i18n objectnullable
Translation dictionaries: locale → key → text, read by the t helper.
Translation dictionaries: locale → key → text, read by the t helper.
partials object
Partials the template includes (name → source), as formfeed templates push collects them from the project's partials folder. At most 100 and 2 MB together; a name is a relative path of up to 200 characters without ...
Possible values: <= 1048576 characters
data_sets object
Named sample data sets besides sample_data (name → data, names up to 100 characters), as the editor shows them and formfeed templates push sends them from data/*.json. At most 50.
Named sample data sets besides sample_data (name → data, names up to 100 characters), as the editor shows them and formfeed templates push sends them from data/*.json. At most 50.
Up to 20 tags of up to 40 characters.
Possible values: <= 20
What version 1 is, up to 500 characters; shown in the version history.
Possible values: <= 500 characters
Publish version 1 at once.
false{
"name": "string",
"slug": "invoice-de",
"description": "string",
"kind": "pdf",
"engine": "jinja2",
"html": "string",
"css": "string",
"head": "string",
"settings": {
"paper": {
"format": "A4",
"width": "100mm",
"height": "150mm",
"landscape": false
},
"margin": {
"top": "20mm",
"right": "15mm",
"bottom": "20mm",
"left": "15mm"
},
"header": {
"html": "string",
"height": "string",
"padding": "0 10mm"
},
"footer": {
"html": "string",
"height": "string",
"padding": "0 10mm"
},
"printBackground": true,
"scale": 1,
"preferCssPageSize": false,
"pageRanges": "1-3, 5",
"waitFor": {
"networkIdle": true,
"selector": null,
"function": "() => window.chartsReady === true",
"timeoutMs": 5000,
"delayMs": 0
},
"tailwind": false,
"pdf": {
"metadata": {
"title": "Rechnung {{ invoice.number }}",
"author": "Fennlor Studio GmbH",
"subject": "string",
"keywords": "string"
},
"tagged": false,
"outline": false,
"ua": true,
"pdfa": true
},
"image": {
"width": 1200,
"height": 630,
"deviceScaleFactor": 2,
"format": "png",
"quality": 0,
"fullPage": false,
"transparent": false,
"clipSelector": null
},
"office": {
"output": "docx"
},
"locale": "de-DE",
"timezone": "Europe/Berlin",
"currency": "EUR",
"markdown": {
"theme": "document",
"html": "safe",
"breaks": false,
"highlight": true,
"math": false,
"diagrams": false,
"css": "string"
},
"einvoice": {
"profile": "en16931",
"flavour": "factur-x",
"xml": "embedded",
"display_check": "warn"
},
"design": {}
},
"sample_data": {},
"data_schema": {},
"i18n": {},
"partials": {},
"data_sets": {},
"tags": [
"string"
],
"change_note": "string",
"publish": false
}