Skip to content
Preview of the Expense claim template

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.

PDFA4 portraitLocale en-GBHTML + JinjaHeader & footer

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.

PathTypeExample
companyobject
company.namestring"Tidewater Analytics Ltd"
company.addressstring"4th Floor, Quayside House ⏎ 12 Wapping Lane ⏎ …"
company.emailstring"expenses@tidewater.example.com"
company.currencystring"GBP"
employeeobject
employee.namestring"Priya Raman"
employee.numberstring"TA-0219"
employee.departmentstring"Client Services"
employee.cost_centrestring"CS-200"
employee.bank_account_endingstring"4821"
claimobject
claim.numberstring"EXP-2026-0917"
claim.period_startdate"2026-09-01"
claim.period_enddate"2026-09-30"
claim.submitted_ondate"2026-09-30"
claim.purposestring"Client workshops in Leeds and Amsterdam, and a…"
claim.advancenumber150
claim.mileage_ratenumber0.45
claim.receipts_urlstring"https://expenses.tidewater.example.com/claims/…"
claim.approverstring"Martin Kowalski"
claim.approver_rolestring"Head of Client Services"
linesarray<object> · 15
lines[].datedate"2026-09-02"
lines[].receipt?string"R01"
lines[].categorystring"Travel"
lines[].descriptionstring"Contactless fares, client meetings in the City"
lines[].projectstring"CLT-130"
lines[].currencystring"GBP"
lines[].amount?number14.7
lines[].vat_ratenumber0
lines[].fx_rate?number0.8612
lines[].miles?number64
notesstring"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"
  }
}'