create_invoice
Generate invoices or credit notes in Billy with line items, optional approval state, and payment terms.
Instructions
Create an invoice (or credit note) in Billy with one or more lines. Created as draft by default; pass state=approved to approve immediately (approval assigns the invoice number and books it). Amounts are in the invoice currency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Document type (default 'invoice') | |
| lines | Yes | Invoice lines (at least one) | |
| state | No | Invoice state (default 'draft') | |
| taxMode | No | Whether unit prices include or exclude VAT (defaults to org setting) | |
| verbose | No | Return the full Billy response. Default false: compact records with key fields only (saves ~90% context) | |
| contactId | Yes | Customer contact ID (see list_contacts) | |
| entryDate | Yes | Invoice date (YYYY-MM-DD) | |
| invoiceNo | No | Manual invoice number (must be unique; auto-assigned when omitted) | |
| currencyId | Yes | Invoice currency, e.g. 'DKK', 'EUR', 'USD' | |
| contactMessage | No | Message shown at the top of the invoice PDF | |
| paymentTermsDays | No | Days for the payment terms (drives dueDate) | |
| paymentTermsMode | No | Payment terms mode, e.g. 'net' |