Why Is My Data Not Showing in a PDFMonkey Document?
Last updated March 23, 2026
When dynamic data does not appear in a generated document, the cause is almost always a mismatch between the variable names in your template and the keys in the JSON payload you send. This page covers every common cause and how to fix each one.
Variable names do not match payload keys
This is the most common cause. The variable name in your template must match the corresponding key in your JSON payload exactly.
If your template contains:
{{ someVariable }}
Your Document payload must include a matching key:
{
"someVariable": "Some value"
}
If the key is missing, misspelled, or uses different casing, the variable renders as blank.
How to fix it
- Open your template and note the exact variable names used.
- Compare them against the keys in the JSON payload you send when creating the document.
- Fix any differences in spelling or structure.
Use the test data tab to verify
Variable names are case-sensitive
Variable names are case-sensitive in both Code (Liquid) and Builder (Vue) templates. firstName, firstname, and FirstName are three different variables.
Template:
{{ firstName }}
Payload (wrong):
{
"firstname": "Jane"
}
Payload (correct):
{
"firstName": "Jane"
}
How to fix it
Pick a consistent naming convention (camelCase is common) and use it in both your template and your API integration. Double-check for subtle differences such as orderId vs orderID or fullName vs fullname.
Nested data requires dot notation
If your payload contains nested objects, you need to traverse the structure with dot notation in your template.
Payload:
{
"client": {
"name": "Jane Doe",
"address": {
"city": "Paris"
}
}
}
Template (Code/Liquid):
{{ client.name }}
{{ client.address.city }}
Writing {{ name }} or {{ city }} alone does not work because those keys exist inside nested objects, not at the top level.
How to fix it
Make sure the path you use in the template follows the full nesting structure of your payload. See Using Dynamic Data for more on accessing nested values and arrays.
The payload is empty or malformed
If you create a document without a payload (or with "payload": {}), every variable evaluates to blank. Similarly, if the JSON is malformed, the entire payload may be ignored.
How to fix it
Verify that your API request includes a valid payload object with the data your template expects:
{
"document": {
"document_template_id": "YOUR_TEMPLATE_ID",
"status": "pending",
"payload": {
"name": "Jane Doe",
"items": [{ "description": "Widget", "price": 9.99 }]
}
}
}
Check your JSON syntax
Builder templates use Vue, not Liquid
Builder templates use Vue expressions, not Liquid. The same principle applies (variable names must match payload keys), but the syntax is different.
In a Builder template, dynamic data is accessed through the $docPayload object. Simple variables look identical to Liquid:
{{ name }}
But if a variable name starts with a number or contains special characters, it is not a valid JavaScript identifier and cannot be used directly. Use bracket notation instead:
{{ $docPayload['123varname'] }}
How to fix it
- Confirm that the variable names in your Builder expressions match the keys in your test data or API payload.
- For keys that are not valid JavaScript identifiers, use
$docPayload['key']bracket notation. - Check that any conditions or repetitions on your components reference existing payload keys.
See Builder vs. Code Templates for more details on the syntax differences.
The template is not published
If you recently changed variable names in your template but did not publish, the generated document still uses the old published version. This can make it look like data is missing when the real issue is that the published template expects different variable names.
How to fix it
Click Publish in the template editor after making changes, then generate the document again. See Why Is My Document Blank? for a detailed explanation of the draft vs. published distinction.
Frequently asked questions
I can see data in the preview but it is missing in the generated document.
The preview uses the draft version of your template and the test data you defined. The generated document uses the published version and the payload you sent via the API. Make sure you have published the template and that the API payload matches the test data structure.
My variable renders as the literal text {{ someVariable }} instead of its value.
In Code templates, this means the Liquid engine did not process the variable. Check that the double curly braces have no extra characters (such as a leading backslash or mismatched braces). In Builder templates, this should not happen unless the text is inside a raw HTML block that bypasses Vue rendering.
How do I debug which data PDFMonkey received?
Create a document with "status": "pending" and then fetch it via the API. The response includes the payload field, which shows the exact data PDFMonkey received. Compare it against what your template expects.
Are arrays and objects supported in the payload?
Yes. You can pass arrays and nested objects in your payload and access them in your template. See Using Dynamic Data for Liquid syntax examples with arrays and objects.
Related pages
- Using Dynamic Data — define test data, access nested values, and name variables correctly
- Naming Variables — naming conventions and rules
- Builder vs. Code Templates — understand the syntax differences between Liquid and Vue
- Why Is My Document Blank? — when the entire document is empty, not just specific data
- Generate Documents with the API — full API payload examples
- Document Statuses and Lifecycle — understand when generation happens
Frequently asked questions
- Why is my data not showing up in the PDFMonkey document?
- The variable names in your template must match the keys in your JSON payload exactly, including case. For example, if your template uses {{firstName}}, your payload must include a "firstName" key — not "firstname" or "FirstName".
- How do I access nested data in a PDFMonkey template?
- In Code templates (Liquid), use dot notation: {{client.name}}. In Builder templates (Vue), use the same dot notation: {{client.name}}. Your JSON payload must include the nested structure: {"client": {"name": "Jane Doe"}}.
- Are PDFMonkey template variable names case-sensitive?
- Yes. Variable names are case-sensitive in both Code (Liquid) and Builder (Vue) templates. The key in your JSON payload must match the variable name exactly, including capitalization.