generate_invoice
Invoice Generator — Generate a professional PDF invoice from line items, client details, and company info. Takes a JSON body (camelCase fields), not form fields. [category: generate]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Line items. Keys MUST be description/quantity/unitPrice — other keys are silently ignored and amounts render as 0. | |
| notes | No | Wrapped text under a 'Notes / Terms' heading at the bottom; empty hides the section. | |
| dueDate | No | Free text printed as 'Due: <value>' — never parsed or validated; empty hides the line. | |
| currency | No | Sets the printed symbol ONLY — no conversion. Unknown codes print '$'; INR prints 'Rs'. | USD |
| clientName | Yes | Client name (REQUIRED). Field name is 'clientName' — not 'client_name'. | |
| taxPercent | No | Percent of subtotal added on top. Unvalidated; the tax row appears only when greater than 0. | |
| clientEmail | No | Printed in BILL TO under the client name; empty = line omitted. Never validated. | |
| companyName | Yes | Issuing company name (REQUIRED). | |
| invoiceDate | No | Free text printed as 'Date: <value>' — never parsed; empty hides the line. | |
| companyEmail | No | Printed in the issuer header block; empty = line omitted. Never validated. | |
| companyPhone | No | Printed in the issuer header block; empty = line omitted. | |
| clientAddress | No | One printed line under BILL TO — no wrapping, so keep it short; empty = line omitted. | |
| invoiceNumber | No | Auto-generated 'INV-<8hex>' when omitted. | |
| companyAddress | No | One printed line in the issuer header — no wrapping; empty = line omitted. | |
| discountPercent | No | Percent of subtotal subtracted. Unvalidated — over 100 yields a negative total. Row hidden when 0. |