Gallery templates

Support Ticket Template: HTML + JSON Payload

Learn the Support Ticket gallery template with practical HTML structure and matching JSON payload for HookPDF API rendering.

This guide is based on the Support Ticket template in the Gallery.

It explains a practical flow: template HTML structure, matching JSON payload, and API render request.

Step 1 - Template HTML structure

HTML
<div class="ticket-header">
<h1>Support Ticket</h1>
<div class="ticket-id">#{{ticket_id}}</div>
</div>
<div class="meta-grid">
<div class="meta-item">
<label>Status</label>
<strong>{{status}}</strong>
</div>
<div class="meta-item">
<label>Priority</label>
<span class="priority {{priority_class}}">{{priority}}</span>
</div>
<div class="meta-item">
<label>Created</label>{{created_date}}</div>
<div class="meta-item">
<label>Assigned To</label>{{assigned_to}}</div>
</div>
<div class="section">
<h3>Subject</h3>
<p>
<strong>{{subject}}</strong>
</p>
</div>
<div class="section">
<h3>Customer</h3>
<p>{{customer_name}} \u2014 {{customer_email}}</p>
</div>
<div class="section">
<h3>Description</h3>
<p>{{description}}</p>
</div>
<div class="section">
<h3>Activity Timeline</h3>
<div class="timeline">{{#each timeline}}<div class="tl-item">
<div class="tl-dot">
</div>
<div class="tl-content">
<strong>{{this.author}}</strong> \u2014 {{this.action}}<br>
<span class="tl-time">{{this.time}}</span>
</div>
</div>{{/each}}</div>
</div>

Step 2 - Matching JSON payload

JSON
{
  "ticket_id": "SUP-4821",
  "status": "In Progress",
  "priority": "High",
  "priority_class": "high",
  "created_date": "Mar 9, 2026",
  "assigned_to": "Mike Ross",
  "subject": "API returning 500 error on batch render",
  "customer_name": "David Chen",
  "customer_email": "david@startup.io",
  "description": "When submitting a batch render request with more than 10 items, the API consistently returns a 500 Internal Server Error. This started after the latest update. Single renders work fine.",
  "timeline": [
    {
      "author": "David Chen",
      "action": "Ticket created",
      "time": "Mar 9, 10:15 AM"
    },
    {
      "author": "Auto-assign",
      "action": "Assigned to Mike Ross (Engineering)",
      "time": "Mar 9, 10:16 AM"
    },
    {
      "author": "Mike Ross",
      "action": "Investigating \u2014 able to reproduce the issue",
      "time": "Mar 9, 11:30 AM"
    }
  ]
}

Step 3 - Final rendered preview in page

Rendered output preview Template style preview

Preview uses the original Gallery template HTML and CSS with sample payload values.

Step 4 - Key mapping checklist

  • {{ticket_id}} -> ticket_id
  • {{status}} -> status
  • {{priority}} -> priority
  • {{priority_class}} -> priority_class
  • {{#each timeline}} -> timeline[]
  • {{this.author}} -> timeline[].author

Step 5 - Render request example

BASH
curl -X POST "https://api.hookpdf.com/v1/render" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "<gallery-support-ticket-template_id>",
    "payload": {
      "ticket_id": "SUP-4821",
      "status": "In Progress",
      "priority": "High",
      "priority_class": "high",
      "created_date": "Mar 9, 2026",
      "assigned_to": "Mike Ross",
      "subject": "API returning 500 error on batch render"
    }
  }'

Use this template for free now

Start with this template in HookPDF and render your first PDF for free.

Use this template free

Related reads

Ready to move from prototype to production?

Create your account and generate your first API-driven PDF with HookPDF.

Get your API key