Skip to main content

Print API reference

The current print origin is https://print.tigasatutiga.com. Local Laravel normally uses http://localhost:3000. Paths have no /api prefix.

Health and templates​

MethodPathInput/output
GET/upLaravel application health
GET/browser/listTemplate metadata
POST/browser/uploadMultipart DOCX field named file
GET/browser/download?path=invoice.docxStored template download
DELETE/browser/delete?path=invoice.docxDelete a template

Template names must be relative paths within the configured storage root. File-browser access should be protected by the deployment's access controls.

Generation​

MethodPathBehaviour
GET/generate/downloadRender the bundled DOCX example
POST/generate/invoice/{filename}Invoice payload to a PDF download
POST/generate/batch-invoice?async=1Accept durable batch work, HTTP 202

Single-invoice generation requires a string INVOICE_NO; invoiceItems is an array when supplied and SUB_TOTAL is numeric when supplied. Batch input is a JSON list and has a configured maximum of 200 invoices.

A synchronous batch call also uses persisted work and may return 202 if additional bounded processing is needed. Do not equate an accepted response with confirmed delivery.

Batch status and control​

MethodPathPurpose
GET/generate/batches/{id}Status, counters, and review entries
POST/generate/batches/process-pendingClaim a pending batch and process bounded work
POST/generate/batches/{id}/processProcess a specific batch
POST/generate/batches/{id}/retryRetry rendering/configuration failures
POST/generate/batches/{id}/resolve-deliveryAcknowledge or authorize retry of uncertain sends

Worker/control calls use the shared X-Print-Worker-Token header; a bearer token is also supported where not reserved for infrastructure authentication. Batch submissions include the stable Idempotency-Key header.

A submission without the configured shared token is rejected. A wrong or missing token can explain a 403 even when /up works.

Telegram​

POST /telegram/webhook accepts Telegram callbacks and queues processing. Configure TELEGRAM_WEBHOOK_SECRET to validate Telegram's secret header.

Webhook registration is performed using Laravel's telegram:webhook command. It is not a route that documentation readers need to call during a local preview.

See Durable invoice delivery for the state model and retry decisions.