
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.
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.
| Path | Type | Example |
|---|---|---|
| company | object | |
| company.name | string | "Fernhollow Tea Company" |
| company.website | string | "fernhollow.example.com" |
| report | object | |
| report.title | string | "Monthly performance report" |
| report.period_label | string | "August 2026" |
| report.comparison_label | string | "July 2026" |
| report.prepared_by | string | "Nadia Rahimi, Head of Finance" |
| report.issued_on | date | "2026-09-08" |
| report.audience | string | "Board and leadership team" |
| report.currency | string | "GBP" |
| report.locale | string | "en-GB" |
| kpis | array<object> · 6 | |
| kpis[].label | string | "Revenue" |
| kpis[].value | number | 184250 |
| kpis[].previous | number | 171900 |
| kpis[].format | string | "currency" |
| kpis[].decimals | number | 0 |
| kpis[].better | string | "higher" |
| monthly_revenue | array<object> · 12 | |
| monthly_revenue[].month | date | "2025-09-01" |
| monthly_revenue[].value | number | 138400 |
| chart | object | |
| chart.max_value | number | 250000 |
| chart.step | number | 50000 |
| chart.target | number | 180000 |
| channels | array<object> · 3 | |
| channels[].name | string | "Online shop" |
| channels[].revenue | number | 114235 |
| channels[].color | string | "#b7791f" |
| top_products | array<object> · 8 | |
| top_products[].name | string | "Harbour Breakfast loose leaf, 250 g" |
| top_products[].sku | string | "FH-HBK-250" |
| top_products[].units | number | 1840 |
| top_products[].previous_units | number | 1702 |
| top_products[].unit_price | number | 8.9 |
| top_products[].revenue | number | 16376 |
| commentary | string | "### 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"
}
}'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": "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"
}
}),
});
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": "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",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())More reports templates

Incident postmortem (Markdown)
A4A blameless incident postmortem in Markdown: severity and impact at a glance, a minute-by-minute timeline table, root cause and contributing factors, what went well, and follow-up actions with owners and due dates — rendered to an A4 PDF.

Release notes (Markdown)
A4Product release notes written in Markdown: a version header, highlights, changes grouped by type from one JSON list, an optional breaking-changes warning, upgrade steps and contributor thanks — rendered to a clean A4 PDF with the GitHub theme.

Meeting minutes
A4An A4 meeting record that is easy to edit visually: key facts, an attendee table, optional apologies, one section per agenda item with an optional highlighted decision, an action-item table and a next-meeting note.