Create a draft invoice
acube_create_draft_invoiceWRITE: saves a new invoice as a DRAFT in A-Cube. Nothing is sent to the SDI until acube_send_draft_invoice. Not idempotent: calling it twice creates two drafts. Validate first with acube_validate_invoice. POST /invoices/draft.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fattura_elettronica_body | Yes | Exactly one invoice body (an array with one object), snake_case keys: dati_generali (dati_generali_documento...), dati_beni_servizi (dettaglio_linee, dati_riepilogo), optional dati_pagamento. Field names as in the A-Cube Italy API reference. | |
| fattura_elettronica_header | No | FatturaPA header as A-Cube JSON (snake_case keys): dati_trasmissione (codice_destinatario, pec_destinatario), cedente_prestatore (seller), cessionario_committente (buyer). Give the full header (seller and buyer) for a draft you intend to send: A-Cube only fills in transmission data automatically, and acube_validate_invoice shows what is missing. |