
210 × 297 mm
HR & employment
Expense claim
An A4 employee expense claim: receipts in other currencies are converted at their exchange rate, mileage is paid per mile, reclaimable VAT is worked out per line, and the totals, the spend by category and the amount due after an advance follow, with a QR code to the receipt images and three sign-off boxes.
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Macros
- Filters
- Currency formatting
- Date formatting
- Number formatting
- Grouping
- QR code
- Repeating table headers
- Header & footer
- Page numbers
- Signature
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 5 top-level fields, 34 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| company | object | |
| company.name | string | "Tidewater Analytics Ltd" |
| company.address | string | "4th Floor, Quayside House ⏎ 12 Wapping Lane ⏎ …" |
| company.email | string | "expenses@tidewater.example.com" |
| company.currency | string | "GBP" |
| employee | object | |
| employee.name | string | "Priya Raman" |
| employee.number | string | "TA-0219" |
| employee.department | string | "Client Services" |
| employee.cost_centre | string | "CS-200" |
| employee.bank_account_ending | string | "4821" |
| claim | object | |
| claim.number | string | "EXP-2026-0917" |
| claim.period_start | date | "2026-09-01" |
| claim.period_end | date | "2026-09-30" |
| claim.submitted_on | date | "2026-09-30" |
| claim.purpose | string | "Client workshops in Leeds and Amsterdam, and a…" |
| claim.advance | number | 150 |
| claim.mileage_rate | number | 0.45 |
| claim.receipts_url | string | "https://expenses.tidewater.example.com/claims/…" |
| claim.approver | string | "Martin Kowalski" |
| claim.approver_role | string | "Head of Client Services" |
| lines | array<object> · 15 | |
| lines[].date | date | "2026-09-02" |
| lines[].receipt? | string | "R01" |
| lines[].category | string | "Travel" |
| lines[].description | string | "Contactless fares, client meetings in the City" |
| lines[].project | string | "CLT-130" |
| lines[].currency | string | "GBP" |
| lines[].amount? | number | 14.7 |
| lines[].vat_rate | number | 0 |
| lines[].fx_rate? | number | 0.8612 |
| lines[].miles? | number | 64 |
| notes | string | "Foreign-currency receipts are converted at the…" |
Render it with the API
After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.
curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
-H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"company": {
"name": "Tidewater Analytics Ltd",
"address": "4th Floor, Quayside House\n12 Wapping Lane\nLondon E1W 2XY",
"email": "expenses@tidewater.example.com",
"currency": "GBP"
},
"employee": {
"name": "Priya Raman",
"number": "TA-0219",
"department": "Client Services",
"cost_centre": "CS-200",
"bank_account_ending": "4821"
},
"claim": {
"number": "EXP-2026-0917",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"submitted_on": "2026-09-30",
"purpose": "Client workshops in Leeds and Amsterdam, and a site visit in Reading",
"advance": 150,
"mileage_rate": 0.45,
"receipts_url": "https://expenses.tidewater.example.com/claims/EXP-2026-0917/receipts",
"approver": "Martin Kowalski",
"approver_role": "Head of Client Services"
},
"lines": [
{
"date": "2026-09-02",
"receipt": "R01",
"category": "Travel",
"description": "Contactless fares, client meetings in the City",
"project": "CLT-130",
"currency": "GBP",
"amount": 14.7,
"vat_rate": 0
},
{
"date": "2026-09-07",
"receipt": "R02",
"category": "Travel",
"description": "Rail, London King'\''s Cross to Leeds, return",
"project": "CLT-104",
"currency": "GBP",
"amount": 126,
"vat_rate": 0
}
],
"notes": "Foreign-currency receipts are converted at the rate on the card statement. Mileage is paid at 45p per mile for business journeys in your own car. Please keep the original receipts until the claim has been paid."
},
"output": {
"format": "pdf",
"filename": "expense-claim.pdf"
}
}'const response = await fetch("https://api-eu.dynamicdocumentapi.com/v1/renders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DYNAMIC_DOCUMENT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"company": {
"name": "Tidewater Analytics Ltd",
"address": "4th Floor, Quayside House\n12 Wapping Lane\nLondon E1W 2XY",
"email": "expenses@tidewater.example.com",
"currency": "GBP"
},
"employee": {
"name": "Priya Raman",
"number": "TA-0219",
"department": "Client Services",
"cost_centre": "CS-200",
"bank_account_ending": "4821"
},
"claim": {
"number": "EXP-2026-0917",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"submitted_on": "2026-09-30",
"purpose": "Client workshops in Leeds and Amsterdam, and a site visit in Reading",
"advance": 150,
"mileage_rate": 0.45,
"receipts_url": "https://expenses.tidewater.example.com/claims/EXP-2026-0917/receipts",
"approver": "Martin Kowalski",
"approver_role": "Head of Client Services"
},
"lines": [
{
"date": "2026-09-02",
"receipt": "R01",
"category": "Travel",
"description": "Contactless fares, client meetings in the City",
"project": "CLT-130",
"currency": "GBP",
"amount": 14.7,
"vat_rate": 0
},
{
"date": "2026-09-07",
"receipt": "R02",
"category": "Travel",
"description": "Rail, London King's Cross to Leeds, return",
"project": "CLT-104",
"currency": "GBP",
"amount": 126,
"vat_rate": 0
}
],
"notes": "Foreign-currency receipts are converted at the rate on the card statement. Mileage is paid at 45p per mile for business journeys in your own car. Please keep the original receipts until the claim has been paid."
},
"output": {
"format": "pdf",
"filename": "expense-claim.pdf"
}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result);import os
import uuid
import requests
response = requests.post(
"https://api-eu.dynamicdocumentapi.com/v1/renders",
headers={
"Authorization": f"Bearer {os.environ['DYNAMIC_DOCUMENT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
},
"data": {
"company": {
"name": "Tidewater Analytics Ltd",
"address": "4th Floor, Quayside House\n12 Wapping Lane\nLondon E1W 2XY",
"email": "expenses@tidewater.example.com",
"currency": "GBP",
},
"employee": {
"name": "Priya Raman",
"number": "TA-0219",
"department": "Client Services",
"cost_centre": "CS-200",
"bank_account_ending": "4821",
},
"claim": {
"number": "EXP-2026-0917",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"submitted_on": "2026-09-30",
"purpose": "Client workshops in Leeds and Amsterdam, and a site visit in Reading",
"advance": 150,
"mileage_rate": 0.45,
"receipts_url": "https://expenses.tidewater.example.com/claims/EXP-2026-0917/receipts",
"approver": "Martin Kowalski",
"approver_role": "Head of Client Services",
},
"lines": [
{
"date": "2026-09-02",
"receipt": "R01",
"category": "Travel",
"description": "Contactless fares, client meetings in the City",
"project": "CLT-130",
"currency": "GBP",
"amount": 14.7,
"vat_rate": 0,
},
{
"date": "2026-09-07",
"receipt": "R02",
"category": "Travel",
"description": "Rail, London King's Cross to Leeds, return",
"project": "CLT-104",
"currency": "GBP",
"amount": 126,
"vat_rate": 0,
},
],
"notes": "Foreign-currency receipts are converted at the rate on the card statement. Mileage is paid at 45p per mile for business journeys in your own car. Please keep the original receipts until the claim has been paid.",
},
"output": {
"format": "pdf",
"filename": "expense-claim.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())More hr & employment templates

Arbeitszeugnis (employment reference)
A4A German qualified employment reference on letterhead: the template writes the opening, the overall rating, the conduct sentence and the closing formula from the rating and the reason for leaving, in the right grammatical forms, switches to an interim reference with one field, and ends with two signature lines.

Monthly timesheet
A4An A4 monthly timesheet that lists every day of the period grouped by ISO week, works out hours from start, end and break, credits leave and sickness, compares the total with the contracted hours, charts hours by activity and ends with employee, manager and payroll sign-off boxes.