Endpoint
Generate HTML, PNG, and PDF files from a structured document definition.
Request Body
Document header fields.
doc_type
string
default:"guia_despacho"
Document template type: guia_despacho, factura, purchase_order, bill_of_lading
Document date (DD/MM/YYYY)
Emitter business activity
Receiver business activity
SII authorization resolution
Person who received goods
Handwritten notes / observations
template
string
default:"guia_despacho.html"
Template file name
Response
Unique identifier for this generation run
Path to generated HTML file
Path to generated PNG file
Path to generated PDF file
Example
curl -X POST http://localhost:8000/generate/document \
-H "Content-Type: application/json" \
-d '{
"header": {
"doc_type": "guia_despacho",
"doc_number": "00054321",
"date": "15/04/2026",
"emitter_name": "ACME FOODS S.A.",
"receiver_name": "DISTRIBUIDORA CENTRAL LTDA."
},
"items": [
{
"description": "HARINA DE TRIGO PREMIUM 25KG",
"qty": 40,
"unit": "UN",
"unit_price": 12500,
"total": 500000
}
]
}'
{
"run_id": "a1b2c3d4e5",
"files": {
"html": "output/a1b2c3d4e5/guia_despacho_00054321.html",
"png": "output/a1b2c3d4e5/guia_despacho_00054321.png",
"pdf": "output/a1b2c3d4e5/guia_despacho_00054321.pdf"
}
}