Getting started
Filling placeholders
Read the template first: placeholders and groups on the template endpoint are the whole contract for values. Then send values as an object keyed by placeholder key.
- Keys are the placeholders' keys exactly as returned, never their labels' wording or the text currently filled in (a label is still accepted, for callers written before keys existed). A placeholder used in several places in the document is filled everywhere at once.
- Keys you omit keep the template's default values. An empty string clears a placeholder.
- A select placeholder accepts exactly one of its options, or an empty string.
- A number placeholder accepts a numeric string such as 1234.56 in either decimal convention; the server rewrites it into the template's declared format, so 1234.56 lands as 1,234.56 where the format says so.
- A date placeholder is not rewritten: send the date already written the way its format shows. The format is the reference date 27 August 2026 written the expected way, so a format of 08/27/2026 wants 10/15/2026.
- Placeholders marked auto are filled by PaperClerk at generation, today's date or the next auto-number, and anything you send for them is ignored.
- A repeating group takes an array of instance objects keyed by the group's field keys; the template's row is cloned once per entry. An omitted group keeps the single authored row; an empty array removes the section. Field values validate exactly like top-level placeholders.
- Where a placeholder carries a description, it is help text from the template's author about the expected value, such as the format or content wanted. It is not printed in the document.
A values object for an invoice template
JSON
{
"client_name": "Maple & Fern Ltd.",
"payment_terms": "Net 15",
"due_date": "10/15/2026",
"line_items": [
{ "item": "Brand identity system", "quantity": "1", "amount": "4800" },
{ "item": "Brand guidelines document", "quantity": "1", "amount": "1200" }
]
}