invoices_create
Creates a new draft invoice with required line items and client details, keeping it editable until finalized and issued with XML/PDF generation.
Instructions
Create a new draft invoice. Requires at least one line item and either a clientId or receiverName/receiverCif. The invoice starts in "draft" status and can be edited until issued. Use invoices_issue to finalize and generate XML/PDF.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | Invoice line items (at least one required) | |
| notes | No | Public notes visible to the client | |
| collect | No | Record an immediate payment. Pass true for full payment with defaults, or an object with value/type/issueDate/documentNumber/mentions for details. | |
| dueDate | No | Payment due date in ISO 8601 format (YYYY-MM-DD) | |
| clientId | No | Client UUID (from clients_list). Either clientId or receiverName should be provided. | |
| currency | No | ISO 4217 currency code (default: RON) | |
| issuerId | No | Issuer ID number | |
| language | No | Document language for PDF generation (default: ro) | |
| mentions | No | Additional legal mentions on the invoice | |
| seriesId | No | Invoice series UUID (from document_series_list). Uses default if not provided. | |
| companyId | No | Company UUID override (uses active company if not set) | |
| issueDate | Yes | Invoice issue date in ISO 8601 format (YYYY-MM-DD) | |
| deputyAuto | No | Deputy vehicle registration number | |
| deputyName | No | Deputy/representative name | |
| issuerName | No | Name of person issuing the invoice | |
| salesAgent | No | Sales agent name | |
| orderNumber | No | Purchase order number | |
| plataOnline | No | Enable online payment via Stripe (default: from company settings) | |
| platitorTva | No | Whether sender is VAT payer (default: false) | |
| receiverCif | No | Receiver tax ID / CIF (used together with receiverName when no client entity exists) | |
| vatIncluded | No | When used with autoApplyVatRules, sets whether unit prices include VAT on all lines. Ensures correct totals after VAT rules change rates. | |
| documentType | No | Document type (default: invoice) | |
| exchangeRate | No | Exchange rate relative to RON (default: 1.0) | |
| internalNote | No | Internal note (not visible to the client) | |
| paymentTerms | No | Payment terms description (e.g., "Net 30") | |
| receiverName | No | Receiver name (used when no client entity exists). Either clientId or receiverName should be provided. | |
| taxPointDate | No | Tax point date if different from issue date (YYYY-MM-DD) | |
| paymentMethod | No | Payment method: bank_transfer (default), cash, card, cheque, other | |
| tvaLaIncasare | No | VAT on collection / TVA la încasare (default: false) | |
| ublExtensions | No | UBL extension fields for advanced e-Factura compliance. These map directly to UBL XML elements not covered by the standard invoice fields. | |
| buyerReference | No | Buyer reference identifier (BT-10) | |
| contractNumber | No | Contract reference number | |
| idempotencyKey | No | Idempotency key to prevent duplicate creation | |
| penaltyEnabled | No | Enable late payment penalty (default: false) | |
| invoiceTypeCode | No | Tax regime / invoice type code. standard = default commercial invoice; reverse_charge = taxare inversa; the other values map to specific Romanian tax-code articles. | |
| deliveryLocation | No | Delivery address | |
| parentDocumentId | No | Parent document UUID (required for credit notes / refunds) | |
| penaltyGraceDays | No | Grace period in days before penalty starts applying | |
| projectReference | No | Project reference number | |
| taxPointDateCode | No | Tax point date code | |
| autoApplyVatRules | No | Auto-apply VAT rules (reverse charge for VIES-valid EU clients, OSS destination rate for non-VIES EU clients). Default: false. | |
| showClientBalance | No | Show client balance on invoice (default: false) | |
| deputyIdentityCard | No | Deputy ID card number | |
| businessProcessType | No | Business process type (e.g., "urn:cen.eu:en16931:2017#compliant#urn:efactura.mfinante.ro:CIUS-RO:1.0.1") | |
| penaltyPercentPerDay | No | Daily penalty percentage (e.g., 0.05 for 0.05% per day) | |
| tenderOrLotReference | No | Tender or lot reference | |
| despatchAdviceReference | No | Despatch advice reference | |
| buyerAccountingReference | No | Buyer accounting reference | |
| invoicedObjectIdentifier | No | Invoiced object identifier | |
| receivingAdviceReference | No | Receiving advice reference |