Work order
Corrective or preventive maintenance: the asset, the tasks with their status, the parts and the safety conditions.
orden-de-trabajo, with the premium design: what has to be done, on which asset, by whom and under which conditions.
"workOrder": {
"number": "OT-2026-0417", "date": "2026-10-14", // required
"clase": "Preventivo", // required: printed as it arrives
"prioridad": "Media", "estado": "Ejecutada",
"programadaPara": "2026-10-14 08:00", "inicio": "…", "fin": "…" // optional
},
"asset": { "nombre": "Planta eléctrica de emergencia", // nombre is required
"codigo": "EQ-PE-002", "ubicacion": "Cuarto técnico, sótano 2",
"marca": "Cummins", "serie": "C150D5-2019-884" },
"billTo": { "name": "…" }, // who requested it
"assignedTo": { "nombre": "…", "documento": "…", "rol": "…", "contacto": "…" },
"description": "Mantenimiento preventivo trimestral según la rutina del fabricante…",
"tasks": [
{ "descripcion": "Cambio de aceite y filtro", "estado": "Ejecutada", "observacion": "…" }
],
"materials": [
{ "codigo": "LU-15W40", "descripcion": "Aceite 15W40", "cantidad": 12, "unidad": "litro", "total": 384000 }
],
"safety": { "permisos": ["Trabajo en caliente"], "condiciones": ["Bloquear y etiquetar…"] },
"signatures": [
{ "nombre": "…", "documento": "…", "rol": "Ejecuta el trabajo",
"trazo": "data:image/png;base64,…", // optional
"sello": { "fechaHora": "2026-10-14 11:45:12 -05:00", "recibidoPor": "App de campo",
"origen": "Envigado · dispositivo TEC-114" } }
]
- Corrective and preventive are the same type, with a different
clase. It is printed in capitals inside a frame, because it is what decides how urgently someone picks the order up. It is not checked against a list: if you work with «Predictivo», the document says so. - Nothing is scheduled or calculated here. Not the next date of a preventive routine, not the cost of the parts, not the duration from the start and end times: everything arrives ready. A material’s
totalis printed as it arrives, never quantity times price. - Each task’s
estadois free text —«Ejecutada», «Pendiente», «No aplica»—: whoever did the task decides whether it is done. - Without
materialsthe parts table is not drawn, because an inspection order spends no parts and an empty table would claim some are missing. Withouttasksit says «Sin tareas» (“No tasks”): an order can be opened just to diagnose. - Signatures carry their stroke and their timestamp, and the timestamp arrives as data: the order was signed when the person signed, not when the PDF was composed. The stroke must be PNG or JPEG; if it cannot be drawn, the line with the details is printed and the document still composes. See What goes inside
data. - Required:
workOrder.number,workOrder.date,workOrder.claseandasset.nombre. Without them the response is400listing what is missing, and no PDF is composed. - It also comes as an 80 mm receipt: the same body with
"plantilla": "tirilla", for the portable thermal printer on site. What does not fit the width is rearranged —tables lose their columns and each row becomes a two-line block—, never dropped. - And on half-letter with
"plantilla": "media-carta": the same document on 14 × 21.6 cm, to print two per sheet and cut them. Columns are laid out to the paper’s scale; nothing is dropped. - And in four more palettes —
corporativa(blue),profesional(green),minimalista(violet) andbasica(orange)—: the same sheet with a different accent on the title, the table headers and the bands. The default design is stillpremium, in grey, and the other paper sizes come in it. - It also accepts
notes,fields,sideNotesandselectedCurrency.
Example: orden-de-trabajo.json.
