Skip to main content

CSV to FatturaPA Mapping Reference

This document describes how the standard Transfer CSV fields are mapped to the Italian FatturaPA XML invoice format.

DatiTrasmissione​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaHeader.datiTrasmissione.pecDestinatariorecipient_pecNorecipient PEC address, lowercased. Computed: businessRegistry.pec. Converted to lowercase
fatturaElettronicaHeader.datiTrasmissione.codiceDestinatariorecipient_codeNoSDI recipient code, uppercased and stripped of spaces. Converted to uppercase. Transform: strReplace
fatturaElettronicaHeader.datiTrasmissione.formatoTrasmissioneNoFPR12private recipient transmission format
fatturaElettronicaHeader.soggettoEmittenteNoCCthe row is a self invoice, so seller and buyer swap sourceCC, the buyer issues the document, on self invoices

CedentePrestatore​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.idFiscaleIva.idPaeserecipient_countryNothe seller VAT number is present in the source that appliesseller VAT country code, uppercased. Computed: businessRegistry.country. Converted to uppercase
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.idFiscaleIva.idCodicerecipient_vat_numberNothe seller VAT number is present in the source that appliesseller VAT number. Computed: businessRegistry.vatNumber
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.codiceFiscalerecipient_fiscal_codeNoseller fiscal code. Computed: businessRegistry.fiscalCode
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.regimeFiscaleNoRF01seller tax regime, ordinary regime by default
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.anagrafica.denominazionerecipient_business_nameNoseller company name. Computed: businessRegistry.businessName
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.anagrafica.nomerecipient_nameNothe seller has no company name, first and last name are used insteadseller first name, when no company name is available. Computed: businessRegistry.name
fatturaElettronicaHeader.cedentePrestatore.datiAnagrafici.anagrafica.cognomerecipient_last_nameNothe seller has no company name, first and last name are used insteadseller last name, when no company name is available. Computed: businessRegistry.lastName
fatturaElettronicaHeader.cedentePrestatore.sede.indirizzorecipient_addressNoseller street. Computed: businessRegistry.address
fatturaElettronicaHeader.cedentePrestatore.sede.comunerecipient_cityNoseller municipality. Computed: businessRegistry.city
fatturaElettronicaHeader.cedentePrestatore.sede.cAPrecipient_postal_codeNoseller postal code. Computed: businessRegistry.postalCode
fatturaElettronicaHeader.cedentePrestatore.sede.nazionerecipient_countryNoseller country. Computed: businessRegistry.country
fatturaElettronicaHeader.cedentePrestatore.sede.provinciarecipient_provinceNoseller province. Computed: businessRegistry.province

CessionarioCommittente​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.idFiscaleIva.idPaeserecipient_countryNothe buyer VAT number is present in the source that appliesbuyer VAT country code. Computed: businessRegistry.country
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.idFiscaleIva.idCodicerecipient_vat_numberNothe buyer VAT number is present in the source that appliesbuyer VAT number. Computed: businessRegistry.vatNumber
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.codiceFiscalerecipient_fiscal_codeNobuyer fiscal code. Computed: businessRegistry.fiscalCode
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.anagrafica.denominazionerecipient_business_nameNobuyer company name. Computed: businessRegistry.businessName
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.anagrafica.nomerecipient_nameNothe buyer has no company name, first and last name are used insteadbuyer first name, when no company name is available. Computed: businessRegistry.name
fatturaElettronicaHeader.cessionarioCommittente.datiAnagrafici.anagrafica.cognomerecipient_last_nameNothe buyer has no company name, first and last name are used insteadbuyer last name, when no company name is available. Computed: businessRegistry.lastName
fatturaElettronicaHeader.cessionarioCommittente.sede.indirizzorecipient_addressNobuyer street. Computed: businessRegistry.address
fatturaElettronicaHeader.cessionarioCommittente.sede.cAPrecipient_postal_codeNobuyer postal code. Computed: businessRegistry.postalCode
fatturaElettronicaHeader.cessionarioCommittente.sede.nazionerecipient_countryNobuyer country. Computed: businessRegistry.country
fatturaElettronicaHeader.cessionarioCommittente.sede.comunerecipient_cityNobuyer municipality. Computed: businessRegistry.city
fatturaElettronicaHeader.cessionarioCommittente.sede.provinciarecipient_provinceNobuyer province. Computed: businessRegistry.province

DatiGeneraliDocumento​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.tipoDocumentodocument_typeNodocument type, TD01 for an invoice and TD04 for a credit note
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.datainvoice_dateNoinvoice date, read as day/month/year. Formatted as date (d/m/Y)
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.numeroinvoice_numberNogetNumero({invoice_series})invoice number, generated from the series when the column is empty. Transform: substitute
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.causaleinvoice_subjectNothe invoice subject column is filledinvoice subject, when the column is filled. Transform: cast
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.divisaNoEURinvoice currency

DettaglioLinee​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaBody[0].datiBeniServizi.dettaglioLineeNoinvoice lines, one group per line number. Grouped by line_number

fatturaElettronicaBody[0].datiBeniServizi.dettaglioLinee​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
numeroLinealine_numberNoline number
descrizioneline_descriptionNoline description
aliquotaIVAline_vat_rateNoVAT rate, two decimals. Transform: formatString
naturaline_vat_natureNothe line VAT rate is zeroVAT exemption nature, required when the rate is zero
quantitaline_quantityNoquantity, two decimals. Transform: formatString
prezzoUnitarioline_unit_priceNounit price, 2 to 8 decimals. Transform: numberFormat
prezzoTotaleNo0line total, quantity multiplied by unit price. Computed: get(row, 'line_quantity') * get(row, 'line_unit_price'). Transform: numberFormat
FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaBody[0].datiBeniServizi.datiRiepilogoNo``VAT summary computed from the lines, split payment aware. Computed: getValue(output, "fatturaElettronicaBody[0].datiBeniServizi.dettaglioLinee"). Transform: calculateInvoiceItDatiRiepilogo
fatturaElettronicaBody[0].datiGenerali.datiGeneraliDocumento.importoTotaleDocumentoNo0.00document total computed from the VAT summary. Computed: getValue(output, "fatturaElettronicaBody[0].datiBeniServizi.datiRiepilogo"). Transform: calculateInvoiceItTotalAmount

DatiPagamento​

FatturaPA FieldCSV SourceReq.DefaultConditionDescription
fatturaElettronicaBody[0].datiPagamento[0].condizioniPagamentoNoTP02payment terms, full payment by default
fatturaElettronicaBody[0].datiPagamento[0].dettaglioPagamento[0].modalitaPagamentopaymentNopayment method
fatturaElettronicaBody[0].datiPagamento[0].dettaglioPagamento[0].importoPagamentoNo0.00amount to pay, computed from the VAT summary and net of VAT under split payment. Computed: getValue(output, "fatturaElettronicaBody[0].datiBeniServizi.datiRiepilogo"). Transform: calculateInvoiceItTotalAmount
fatturaElettronicaBody[0].datiPagamento[0].dettaglioPagamento[0].ibanpayment_ibanNobeneficiary IBAN
fatturaElettronicaBody[0].datiPagamento[0].dettaglioPagamento[0].data_scadenza_pagamentopayment_due_dateNopayment due date, read as day/month/year. Formatted as date (d/m/Y)