Skip to content
Preview of the Monthly KPI report template

210 × 297 mm

Reports

Monthly KPI report

A two-page A4 management report with KPI cards that show the change against last month, a 12-month revenue bar chart drawn with render_chart from a JSON array, the current month highlighted against a target line, revenue by channel, a top-products table and Markdown commentary, with page numbers.

PDFA4 portraitLocale en-GBHTML + JinjaHeader & footer

Opens Dynamic Document API with this template preloaded in a free workspace.

Generating this from your own data? See the Report Generation API.

Template language features

  • Loops
  • Conditionals
  • Macros
  • Filters
  • Currency formatting
  • Date formatting
  • Number formatting
  • Markdown
  • Chart
  • Page breaks
  • Repeating table headers
  • Header & footer
  • Page numbers

Filters such as format_currency and qrcode are described in the template language reference.

Variables

Derived from the sample data: 8 top-level fields, 38 paths in total. Send the same shape as data.

PathTypeExample
companyobject
company.namestring"Fernhollow Tea Company"
company.websitestring"fernhollow.example.com"
reportobject
report.titlestring"Monthly performance report"
report.period_labelstring"August 2026"
report.comparison_labelstring"July 2026"
report.prepared_bystring"Nadia Rahimi, Head of Finance"
report.issued_ondate"2026-09-08"
report.audiencestring"Board and leadership team"
report.currencystring"GBP"
report.localestring"en-GB"
kpisarray<object> · 6
kpis[].labelstring"Revenue"
kpis[].valuenumber184250
kpis[].previousnumber171900
kpis[].formatstring"currency"
kpis[].decimalsnumber0
kpis[].betterstring"higher"
monthly_revenuearray<object> · 12
monthly_revenue[].monthdate"2025-09-01"
monthly_revenue[].valuenumber138400
chartobject
chart.max_valuenumber250000
chart.stepnumber50000
chart.targetnumber180000
channelsarray<object> · 3
channels[].namestring"Online shop"
channels[].revenuenumber114235
channels[].colorstring"#b7791f"
top_productsarray<object> · 8
top_products[].namestring"Harbour Breakfast loose leaf, 250 g"
top_products[].skustring"FH-HBK-250"
top_products[].unitsnumber1840
top_products[].previous_unitsnumber1702
top_products[].unit_pricenumber8.9
top_products[].revenuenumber16376
commentarystring"### Highlights ⏎ - Revenue rose **7.2%** on Ju…"

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": "Fernhollow Tea Company",
      "website": "fernhollow.example.com"
    },
    "report": {
      "title": "Monthly performance report",
      "period_label": "August 2026",
      "comparison_label": "July 2026",
      "prepared_by": "Nadia Rahimi, Head of Finance",
      "issued_on": "2026-09-08",
      "audience": "Board and leadership team",
      "currency": "GBP",
      "locale": "en-GB"
    },
    "kpis": [
      {
        "label": "Revenue",
        "value": 184250,
        "previous": 171900,
        "format": "currency",
        "decimals": 0,
        "better": "higher"
      },
      {
        "label": "Orders",
        "value": 4812,
        "previous": 4655,
        "format": "number",
        "decimals": 0,
        "better": "higher"
      }
    ],
    "monthly_revenue": [
      {
        "month": "2025-09-01",
        "value": 138400
      },
      {
        "month": "2025-10-01",
        "value": 146200
      }
    ],
    "chart": {
      "max_value": 250000,
      "step": 50000,
      "target": 180000
    },
    "channels": [
      {
        "name": "Online shop",
        "revenue": 114235,
        "color": "#b7791f"
      },
      {
        "name": "Wholesale",
        "revenue": 44220,
        "color": "#1f2a37"
      }
    ],
    "top_products": [
      {
        "name": "Harbour Breakfast loose leaf, 250 g",
        "sku": "FH-HBK-250",
        "units": 1840,
        "previous_units": 1702,
        "unit_price": 8.9,
        "revenue": 16376
      },
      {
        "name": "Smoked Lapsang, 100 g tin",
        "sku": "FH-LAP-100",
        "units": 1212,
        "previous_units": 1251,
        "unit_price": 11.5,
        "revenue": 13938
      }
    ],
    "commentary": "### Highlights\n\n- Revenue rose **7.2%** on July to £184,250, the strongest month since December, helped by the late-summer sampler campaign.\n- Gross margin improved to 58.4% after the new packaging contract started on 1 August.\n- The refund rate fell to 2.1% following the courier change for deliveries to Scotland.\n\n### Watch items\n\n- Two wholesale café orders moved into September; we expect **£6,000 to £8,000** to land next month.\n- Cast-iron teapot stock covers about three weeks of sales at the current rate.\n\n### Next month\n\n- Launch the autumn blends on 15 September.\n- Review subscription pricing ahead of the October renewal cycle."
  },
  "output": {
    "format": "pdf",
    "filename": "report-monthly-kpi.pdf"
  }
}'