What variable syntax does ConvertStack use?
Double curly braces: {{variable_name}}. Variables can appear in text, HTML attributes, style values, or even class names. Pass matching keys in the data object of your API request.
Build reusable HTML templates with {{variables}} for your invoices, receipts, certificates, and reports. Pass data at render time — no layout work per request.
Three steps from template to PDF in your product.
Write HTML + CSS in the visual template editor. Use {{variable}} syntax anywhere — in text, URLs, class names, or style values.
Each template gets a unique tpl_* ID. Reference it in API calls — your layout lives in ConvertStack, not your codebase.
POST your template ID and a data payload. ConvertStack injects your variables, renders with Chromium, and returns a download URL — all in one request.
Start from a production-ready template or build from scratch. Every template is fully customizable in the visual editor.
Dynamic line items, automatic tax calculation, and your branding. Pass a JSON payload and get a pixel-perfect PDF — every time.
Generate clean, branded receipts at checkout. Works for e-commerce, SaaS subscriptions, and point-of-sale — send as PDF attachment or link.
Issue completion certificates, awards, and credentials at scale. Each one personalized — no manual design work per recipient.
Generate branded price quotes and proposals from your CRM data. Quote validity, optional items, tiered pricing — all templated.
Inject metrics, charts, and tables from your data pipeline into a consistent report template. Ship weekly digests or on-demand PDFs from any data source.
Reference a template by ID and pass your data as JSON. ConvertStack handles the rest.
curl -X POST https://api.convertstack.run/v1/pdf \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"template_id": "tpl_a3f9c2e1b8d0...",
"data": {
"company_name": "Acme Corp",
"invoice_number": "INV-2026-0047",
"customer_name": "Globex Corp",
"due_date": "2026-06-30",
"total": "$15,000.00"
}
}'
const res = await fetch('https://api.convertstack.run/v1/pdf', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CONVERTSTACK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
template_id: 'tpl_a3f9c2e1b8d0...',
data: {
company_name: 'Acme Corp',
invoice_number: 'INV-2026-0047',
customer_name: 'Globex Corp',
due_date: '2026-06-30',
total: '$15,000.00',
},
}),
});
const { url } = await res.json();
console.log('PDF ready:', url);
import requests
response = requests.post(
"https://api.convertstack.run/v1/pdf",
headers={
"Authorization": f"Bearer {CONVERTSTACK_API_KEY}",
"Content-Type": "application/json",
},
json={
"template_id": "tpl_a3f9c2e1b8d0...",
"data": {
"company_name": "Acme Corp",
"invoice_number": "INV-2026-0047",
"customer_name": "Globex Corp",
"due_date": "2026-06-30",
"total": "$15,000.00",
},
},
)
pdf_url = response.json()["url"]
print(f"PDF ready: {pdf_url}")
Auto-generate invoices and receipts from order webhooks. Attach PDFs to confirmation emails without writing layout code.
Issue personalized certificates at course completion. Batch-generate for 10,000 students as easily as for one.
Schedule weekly PDF reports from your data warehouse. Push to S3 or email recipients — no manual exports.
Double curly braces: {{variable_name}}. Variables can appear in text, HTML attributes, style values, or even class names. Pass matching keys in the data object of your API request.
Yes. The template engine supports {{#each items}} blocks for repeating sections. Iterate over line items, table rows, or any JSON array in your data payload.
Absolutely. Templates support any valid CSS including web fonts, flexbox, grid, and custom properties. The visual editor lets you write and preview CSS alongside your HTML in real time.
No hard limit on templates — create as many as your different document types require. Each rendering call deducts from your conversion credit quota, not template storage.
Templates are managed via the dashboard and API. You can create, update, and delete templates programmatically using the /v1/templates endpoints, making it easy to integrate with your CI/CD pipeline.
Join the waitlist for early access. First 1,000 conversions free — no credit card required.