recurring_invoices_create
Create a new recurring invoice template. The system will automatically generate invoices based on the specified frequency and schedule. Supports fixed, updated_product, bnr_rate and bnr_rate_markup pricing rules on line items.
Instructions
Create a new recurring invoice template. The system will automatically generate invoices based on the specified frequency and schedule. Supports fixed, updated_product, bnr_rate and bnr_rate_markup pricing rules on line items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | Array of line items (minimum 1 required) | |
| notes | No | Notes printed on every generated document. Placeholders: [[luna]], [[luna±N]], [[an]], [[an±N]], [[luna_nr]], [[curs]] (the BNR rate note), [[suma:EXPR]] (an amount computed from EXPR, e.g. [[suma:1900*curs]] = 1,900 EUR at the BNR rate of the issue date; names: curs, curs_EUR, curs_USD…, sold, sold_anterior, rata), and with a running balance: [[sold]] (left after this invoice), [[sold_anterior]] (before), [[rata]] (deducted now). Amounts print in Romanian format (9.633,00). | |
| balance | No | Running balance in RON (e.g. an investment recovered through rent reductions). Reduced on every issuance by balanceStep; printed with [[sold]]. The template pauses when it reaches zero. | |
| clientId | Yes | UUID of the client | |
| currency | Yes | ISO 4217 currency code (e.g., RON, EUR) | |
| seriesId | Yes | UUID of the document series | |
| stopDate | No | ISO 8601 date to stop generation (YYYY-MM-DD) | |
| companyId | No | Company UUID (overrides configured default) | |
| frequency | Yes | How often to generate invoices | |
| reference | No | Human-readable reference for this recurring invoice | |
| balanceStep | No | Expression deducted from balance per issuance, e.g. "1900*curs" (1,900 EUR at the BNR rate of the issue date). Names: curs, curs_EUR…, sold_anterior. The last deduction is capped at what is left. | |
| dueDateDays | No | Days after issue date for due date (required if dueDateType is days) | |
| dueDateType | Yes | How due date is calculated. days = N days after issue. fixed_day = fixed day of month. | |
| documentType | Yes | Document type to generate | |
| frequencyDay | Yes | Day of month for generation (1-31) | |
| paymentTerms | No | Payment terms text | |
| autoEmailTime | No | Time to send email (HH:mm, default: "09:00") | |
| frequencyMonth | No | Month for yearly generation (1-12, required if frequency is yearly) | |
| penaltyEnabled | No | Enable late payment penalties (default: false) | |
| dueDateFixedDay | No | Fixed day of month for due date (1-31, required if dueDateType is fixed_day) | |
| invoiceTypeCode | Yes | Tax regime / invoice type code | |
| autoEmailEnabled | No | Auto-send email on invoice generation (default: false) | |
| nextIssuanceDate | Yes | ISO 8601 date for the first invoice generation (YYYY-MM-DD) | |
| penaltyGraceDays | No | Grace period in days before penalties apply | |
| autoEmailDayOffset | No | Days offset for email sending (default: 0) | |
| penaltyPercentPerDay | No | Daily penalty percentage |