generate_fattura_semplificata
Create simplified Italian electronic invoices, credit notes, and debit notes as VFSM10 XML for transactions up to EUR 400, returning the XML and filename for SDI.
Instructions
Assemble a complete FatturaSemplificata VFSM10 XML document.
Use this for simplified invoices (TD07), simplified credit notes (TD08), and simplified debit notes (TD09) per art. 21-bis DPR 633/72. These are valid for transactions up to EUR 400 (tax-inclusive).
The simplified format has a flatter structure than the ordinary FatturaPA: no per-line VAT breakdown (DettaglioLinee/DatiRiepilogo), no DatiPagamento in the body. Each DatiBeniServizi entry carries its own Descrizione, Importo, and DatiIVA.
On success returns {'xml': str, 'filename': str, 'length_bytes': int}. On error returns {'error': ''}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allegati | No | Optional list of attachments. Each: NomeAttachment, Attachment (base64), optional FormatoAttachment, DescrizioneAttachment. | |
| dati_generali | Yes | General document data: TipoDocumento (TD07/TD08/TD09), Divisa, Data (YYYY-MM-DD), Numero. Optional: BolloVirtuale ('SI'), DatiFatturaRettificata (NumeroFR, DataFR, ElementiRettificati) for TD08/TD09. | |
| dati_beni_servizi | Yes | List of goods/services entries. Each entry: Descrizione (max 1000 chars), Importo (decimal, tax-inclusive amount), DatiIVA (Imposta and/or Aliquota), optional Natura code, optional RiferimentoNormativo. | |
| dati_trasmissione | Yes | Transmission data: IdTrasmittente (IdPaese + IdCodice), ProgressivoInvio, CodiceDestinatario (7-char, or '0000000' for PEC), and optionally PECDestinatario. FormatoTrasmissione is always FSM10. | |
| cedente_prestatore | Yes | Seller data: IdFiscaleIVA (IdPaese + IdCodice), optional CodiceFiscale, Denominazione or Nome+Cognome, Sede (Indirizzo, CAP, Comune, Nazione), RegimeFiscale (RF01-RF19). | |
| cessionario_committente | Yes | Buyer data: IdentificativiFiscali (IdFiscaleIVA and/or CodiceFiscale), optional AltriDatiIdentificativi (Denominazione or Nome+Cognome, Sede). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||