Skip to content

Preview PDF Template

POST
/api/pdf-reports/preview

Preview a PDF template as HTML with sample data. Pass either templateId for a saved template or draft for an unsaved one (exactly one of the two).

Authorizations

ApiKeyAuth

API key for authentication. Get your API key from the dashboard.

Type
API Key (header: X-Api-Key)

Request Body

application/json
JSON
{
  
"templateId": "string",
  
"draft": {
  
  
"reportType": "string",
  
  
"editorConfig": "string",
  
  
"pageSettings": "string",
  
  
"customCss": "string"
  
},
  
"sampleData": {
  
  
"additionalProperties": null
  
}
}

Responses

HTML preview

text/html
JSON
"string"

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

AstroAPI Documentation