Documents API

Document registry

Everything that is not an electrical test form: safety, business and field paperwork.

Contents

Electrical testing has its own engine, described above. Everything else (JHA, LOTO, PTP, invoices, daily field reports, job offers) is a registry of document types behind one generic generator, so a new document type is a registry entry rather than an endpoint.

GET/documents/categories
GET/documents?category= &search=

Generating#

FieldTypeDefault
doc_idstringRequired. From GET /documents.
fieldsobjectRequired. { field_key: value } for that document type.
output_formatstring"pdf" · also "docx", "pptx"
ai_enhancebooleantrue-false formats your fields verbatim, with no model call
company, prepared_bystring""

Purpose-built endpoints exist alongside the registry for the documents with their own input shapes.

POST/ai/jha
POST/ai/report
POST/ai/email
POST/ai/estimate
EndpointBody
/ai/jhawork_desc, voltage, equipment, job_site
/ai/reportreport_type, raw_input, job_number, job_site
/ai/emailemail_type, context
/ai/estimatejob_description, location