Your data and your layout have different jobs
Data goes in vars
Customer names, invoice lines, and other values belong in the job’s vars object.
Layout goes in the blueprint
Describe headings, paragraphs, tables, page layout, and styles using JayCode nodes.
Expressions connect them
Use {{ customerName }} in a content value to insert data from the job.
JayCode does not infer a finished layout from arbitrary JSON. The blueprint defines how your data becomes a document.
Start with a complete JSON example
This job includes its own blueprint, so it does not depend on a saved template slug. Change customerName to personalize the output.
{
"lang": "JayCode",
"type": "job",
"outputFileName": "receipt-001.pdf",
"blueprint": {
"lang": "JayCode",
"type": "blueprint",
"body": [
{
"type": "heading",
"level": 2,
"value": "Receipt"
},
{
"type": "paragraph",
"value": "{{ 'Thank you, ' + customerName + '!' }}"
}
]
},
"vars": {
"customerName": "Jane Smith"
}
}A heading reading “Receipt”, followed by “Thank you, Jane Smith!”. The blueprint controls the presentation; vars supplies the name.
Move from one example to reusable documents
Save the blueprint
Register the document definition and assign it a slug in the dashboard.
Reference it in each job
Replace the inline
blueprintobject with your saved slug and send newvarsfor each document.Add document logic
Use expressions, data-driven content, and resources as your template grows.
Blueprint foundation · Jay expressions · Data-driven content
Before you integrate
Do I need HTML or CSS?
No. Define the document with JayCode’s JSON structure and styling properties. Existing HTML templates need to be recreated as blueprints.
Can I use arrays and calculated values?
Yes. Jay expressions support array access and arithmetic. Data-driven content lets you build repeated sections such as invoice lines.
Where can I see a larger example?
The invoice API page includes the production Prism payload with seller details, line items, and totals.
How do I receive the PDF?
Jobs run asynchronously. Handle the completion webhook and retrieve the PDF using its signed download URL. See the webhook integration guide.