
210 × 90 mm
Tickets & passes
Event admission ticket
A 210 × 90 mm seated admission ticket with a tear-off stub: event, venue, door and show times, section, row and seat, the holder's name, price with booking fee, a scannable QR code and short conditions of entry.
PDFCustom sizeLocale en-GBHTML + Jinja
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Macros
- Filters
- Currency formatting
- Date formatting
- QR code
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 7 top-level fields, 28 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| event | object | |
| event.name | string | "The Halcyon Tramlines" |
| event.subtitle | string | "Night Ferry Tour 2026 · with support from Orla…" |
| event.presenter | string | "Kelsbury Arts Trust presents" |
| event.doors_at | date | "2026-11-21T18:30:00Z" |
| event.starts_at | date | "2026-11-21T19:30:00Z" |
| event.timezone | string | "Europe/London" |
| event.age_policy | string | "Ages 14+; under-16s must be accompanied by an …" |
| venue | object | |
| venue.name | string | "Ropewalk Hall" |
| venue.address | string | "Quayside Road, Kelsbury KB4 2QT" |
| seat | object | |
| seat.entrance | string | "Door 3" |
| seat.section | string | "Stalls left" |
| seat.row | string | "H" |
| seat.number | string | "14" |
| holder | object | |
| holder.name | string | "Harriet Oyelaran-Beck" |
| ticket | object | |
| ticket.type | string | "Seated · Standard" |
| ticket.number | string | "KAT-261121-004817" |
| ticket.order_reference | string | "ORD-88213" |
| ticket.currency | string | "GBP" |
| ticket.face_value | number | 38.5 |
| ticket.booking_fee | number | 3.85 |
| ticket.scan_token | string | "https://tickets.example.com/v/KAT261121004817?…" |
| fine_print | array<string> · 4 | "Valid for one admission on the date shown" |
| help_url | string | "tickets.example.com/help" |
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": {
"event": {
"name": "The Halcyon Tramlines",
"subtitle": "Night Ferry Tour 2026 · with support from Orla Wrenfield",
"presenter": "Kelsbury Arts Trust presents",
"doors_at": "2026-11-21T18:30:00Z",
"starts_at": "2026-11-21T19:30:00Z",
"timezone": "Europe/London",
"age_policy": "Ages 14+; under-16s must be accompanied by an adult"
},
"venue": {
"name": "Ropewalk Hall",
"address": "Quayside Road, Kelsbury KB4 2QT"
},
"seat": {
"entrance": "Door 3",
"section": "Stalls left",
"row": "H",
"number": "14"
},
"holder": {
"name": "Harriet Oyelaran-Beck"
},
"ticket": {
"type": "Seated · Standard",
"number": "KAT-261121-004817",
"order_reference": "ORD-88213",
"currency": "GBP",
"face_value": 38.5,
"booking_fee": 3.85,
"scan_token": "https://tickets.example.com/v/KAT261121004817?c=7QK3M"
},
"fine_print": [
"Valid for one admission on the date shown",
"Each code can be scanned once and copies are refused"
],
"help_url": "tickets.example.com/help"
},
"output": {
"format": "pdf",
"filename": "ticket-event-admission.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": {
"event": {
"name": "The Halcyon Tramlines",
"subtitle": "Night Ferry Tour 2026 · with support from Orla Wrenfield",
"presenter": "Kelsbury Arts Trust presents",
"doors_at": "2026-11-21T18:30:00Z",
"starts_at": "2026-11-21T19:30:00Z",
"timezone": "Europe/London",
"age_policy": "Ages 14+; under-16s must be accompanied by an adult"
},
"venue": {
"name": "Ropewalk Hall",
"address": "Quayside Road, Kelsbury KB4 2QT"
},
"seat": {
"entrance": "Door 3",
"section": "Stalls left",
"row": "H",
"number": "14"
},
"holder": {
"name": "Harriet Oyelaran-Beck"
},
"ticket": {
"type": "Seated · Standard",
"number": "KAT-261121-004817",
"order_reference": "ORD-88213",
"currency": "GBP",
"face_value": 38.5,
"booking_fee": 3.85,
"scan_token": "https://tickets.example.com/v/KAT261121004817?c=7QK3M"
},
"fine_print": [
"Valid for one admission on the date shown",
"Each code can be scanned once and copies are refused"
],
"help_url": "tickets.example.com/help"
},
"output": {
"format": "pdf",
"filename": "ticket-event-admission.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": {
"event": {
"name": "The Halcyon Tramlines",
"subtitle": "Night Ferry Tour 2026 · with support from Orla Wrenfield",
"presenter": "Kelsbury Arts Trust presents",
"doors_at": "2026-11-21T18:30:00Z",
"starts_at": "2026-11-21T19:30:00Z",
"timezone": "Europe/London",
"age_policy": "Ages 14+; under-16s must be accompanied by an adult",
},
"venue": {
"name": "Ropewalk Hall",
"address": "Quayside Road, Kelsbury KB4 2QT",
},
"seat": {
"entrance": "Door 3",
"section": "Stalls left",
"row": "H",
"number": "14",
},
"holder": {
"name": "Harriet Oyelaran-Beck",
},
"ticket": {
"type": "Seated · Standard",
"number": "KAT-261121-004817",
"order_reference": "ORD-88213",
"currency": "GBP",
"face_value": 38.5,
"booking_fee": 3.85,
"scan_token": "https://tickets.example.com/v/KAT261121004817?c=7QK3M",
},
"fine_print": ["Valid for one admission on the date shown", "Each code can be scanned once and copies are refused"],
"help_url": "tickets.example.com/help",
},
"output": {
"format": "pdf",
"filename": "ticket-event-admission.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())