create_invoice
Issue an Italy B2B electronic invoice (fattura elettronica) in FatturaPA format (FPR12) and transmit it to the national SdI (Sistema di Interscambio) via Invoicetronic. Builds the FatturaPA XML (seller/buyer P.IVA + optional Codice Fiscale, address, line items, IVA breakdown) and uploads it under your own Invoicetronic API key. Bring your own credential as header x-invoicetronic-key — ik_test_ keys are free sandbox (no fiscal effect), ik_live_ keys transmit real invoices to the SdI (same base URL; the key prefix selects the environment). Italian IVA rates supported: 22 (ordinaria), 10, 5, 4 (ridotte). Amounts are in EUR. Transmission is asynchronous: this returns a send id — poll query_invoice with it to learn the SdI outcome (SENT / DELIVERED / REJECTED / NOT_DELIVERED). There is no cancel at the SdI level: to reverse an invoice you issue a credit note (nota di credito) as a new invoice.
Parameters23
| seller_name | string | required | Seller legal name / denominazione (CedentePrestatore). |
| seller_vat | string | required | Seller Partita IVA (P.IVA), 11 digits, e.g. 12345678903. IT prefix optional. |
| seller_tax_code | string | optional | Optional seller Codice Fiscale (11 digits for companies or 16 chars for individuals). |
| seller_address | string | required | Seller street address (Sede/Indirizzo). |
| seller_cap | string | required | Seller postal code / CAP, 5 digits. |
| seller_city | string | required | Seller city / Comune. |
| seller_province | string | optional | Optional seller province, 2-letter code (e.g. MI, RM). |
| seller_regime | string | optional | Seller tax regime code (RegimeFiscale). Default RF01 (ordinario). Others: RF19 (forfettario), etc. |
| customer_name | string | required | Buyer legal name / denominazione (CessionarioCommittente). |
| customer_vat | string | optional | Buyer Partita IVA (P.IVA), 11 digits. Provide this and/or customer_tax_code. |
| customer_tax_code | string | optional | Buyer Codice Fiscale (16 chars for individuals, 11 digits for companies). Provide this and/or customer_vat. |
| customer_address | string | required | Buyer street address (Sede/Indirizzo). |
| customer_cap | string | required | Buyer postal code / CAP, 5 digits. |
| customer_city | string | required | Buyer city / Comune. |
| customer_province | string | optional | Optional buyer province, 2-letter code. |
| customer_country | string | optional | Buyer country code (Nazione). Default IT. |
| codice_destinatario | string | optional | Recipient SdI Codice Destinatario, 7 chars. Default 0000000 (recipient retrieves from the tax drawer / cassetto fiscale, or set pec_destinatario). |
| pec_destinatario | string | optional | Optional recipient PEC email — used when codice_destinatario is 0000000 to route the invoice by certified email. |
| invoice_number | string | optional | Invoice number (Numero). Auto-generated if omitted. |
| issue_date | string | optional | Invoice date (Data), YYYY-MM-DD. Default: today (UTC). |
| document_type | string | optional | FatturaPA TipoDocumento. Default TD01 (fattura). Use TD04 for a credit note (nota di credito). |
| currency | string | optional | Document currency (Divisa). Default EUR. |
| lines | array | required | Invoice line items. Each: description, unit_price (net, IVA-exclusive, EUR), vat_rate (22|10|5|4), optional quantity (default 1). |
Raw schema
{
"type": "object",
"properties": {
"seller_name": {
"type": "string",
"description": "Seller legal name / denominazione (CedentePrestatore)."
},
"seller_vat": {
"type": "string",
"description": "Seller Partita IVA (P.IVA), 11 digits, e.g. 12345678903. IT prefix optional."
},
"seller_tax_code": {
"type": "string",
"description": "Optional seller Codice Fiscale (11 digits for companies or 16 chars for individuals)."
},
"seller_address": {
"type": "string",
"description": "Seller street address (Sede/Indirizzo)."
},
"seller_cap": {
"type": "string",
"description": "Seller postal code / CAP, 5 digits."
},
"seller_city": {
"type": "string",
"description": "Seller city / Comune."
},
"seller_province": {
"type": "string",
"description": "Optional seller province, 2-letter code (e.g. MI, RM)."
},
"seller_regime": {
"type": "string",
"description": "Seller tax regime code (RegimeFiscale). Default RF01 (ordinario). Others: RF19 (forfettario), etc."
},
"customer_name": {
"type": "string",
"description": "Buyer legal name / denominazione (CessionarioCommittente)."
},
"customer_vat": {
"type": "string",
"description": "Buyer Partita IVA (P.IVA), 11 digits. Provide this and/or customer_tax_code."
},
"customer_tax_code": {
"type": "string",
"description": "Buyer Codice Fiscale (16 chars for individuals, 11 digits for companies). Provide this and/or customer_vat."
},
"customer_address": {
"type": "string",
"description": "Buyer street address (Sede/Indirizzo)."
},
"customer_cap": {
"type": "string",
"description": "Buyer postal code / CAP, 5 digits."
},
"customer_city": {
"type": "string",
"description": "Buyer city / Comune."
},
"customer_province": {
"type": "string",
"description": "Optional buyer province, 2-letter code."
},
"customer_country": {
"type": "string",
"description": "Buyer country code (Nazione). Default IT."
},
"codice_destinatario": {
"type": "string",
"description": "Recipient SdI Codice Destinatario, 7 chars. Default 0000000 (recipient retrieves from the tax drawer / cassetto fiscale, or set pec_destinatario)."
},
"pec_destinatario": {
"type": "string",
"description": "Optional recipient PEC email — used when codice_destinatario is 0000000 to route the invoice by certified email."
},
"invoice_number": {
"type": "string",
"description": "Invoice number (Numero). Auto-generated if omitted."
},
"issue_date": {
"type": "string",
"description": "Invoice date (Data), YYYY-MM-DD. Default: today (UTC)."
},
"document_type": {
"type": "string",
"description": "FatturaPA TipoDocumento. Default TD01 (fattura). Use TD04 for a credit note (nota di credito)."
},
"currency": {
"type": "string",
"description": "Document currency (Divisa). Default EUR."
},
"lines": {
"type": "array",
"minItems": 1,
"description": "Invoice line items. Each: description, unit_price (net, IVA-exclusive, EUR), vat_rate (22|10|5|4), optional quantity (default 1).",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Line description (Descrizione)."
},
"unit_price": {
"type": "number",
"description": "Net unit price in EUR, IVA-exclusive (PrezzoUnitario)."
},
"vat_rate": {
"type": "number",
"description": "IVA rate percent: 22 (ordinaria), 10, 5, or 4 (ridotte)."
},
"quantity": {
"type": "number",
"description": "Quantity (Quantita). Default 1."
}
},
"required": [
"description",
"unit_price",
"vat_rate"
]
}
}
},
"required": [
"seller_name",
"seller_vat",
"seller_address",
"seller_cap",
"seller_city",
"customer_name",
"customer_address",
"customer_cap",
"customer_city",
"lines"
]
}