Electronic invoicing easy, fast and with high security standards
Automates sending, signing, receiving and digital storage of electronic invoices via API
All the knowledge you need
Here you can find some advice to consider to approach this API. If you prefer, we provide code samples, OAS3 documentation, the ability to try the API live via the Swagger UI or import the entire collection into Postman. We also offer a Sandbox environment where you can experiment with all kinds of requests completely free of charge.
Get the token in the appropriate section before you start.
Configure the company
Configure notifications to manage approvals and rejections
This operation should only be performed when setting up the company for the first time.
If you are interested in the passive cycle, follow this guide first: https://openapi.it/en/blog/register-recipient-code-italian-revenue-agency.html
Send the first invoice
Once the invoice is sent, the notification will be received at the URL specified in the notification configuration.
The response to an invoice send will contain a uuid that can be used later to retrieve the invoice /invoices, any notifications /invoices_notifications, or download the invoice /invoices_download
- Oas file url https://console.openapi.com/oas/en/sdi.openapi.json
- Fork or import with Postman
- Production domain sdi.openapi.it
- Sandbox domain test.sdi.openapi.it
-
Production Scopes 21
- GET sdi.openapi.it/invoices
- POST sdi.openapi.it/invoices
- GET sdi.openapi.it/invoices_download
- DELETE sdi.openapi.it/business_registries
- POST sdi.openapi.it/business_registry_configurations
- POST sdi.openapi.it/api_configurations
- DELETE sdi.openapi.it/api_configurations
- GET sdi.openapi.it/api_configurations
- DELETE sdi.openapi.it/business_registry_configurations
- GET sdi.openapi.it/business_registry_configurations
- GET sdi.openapi.it/invoices_notifications
- POST sdi.openapi.it/supplier_invoice_imports
- POST sdi.openapi.it/customer_invoice_imports
- GET sdi.openapi.it/invoices_stats
- PATCH sdi.openapi.it/business_registry_configurations
- POST sdi.openapi.it/invoices_signature
- POST sdi.openapi.it/invoices_legal_storage
- POST sdi.openapi.it/invoices_signature_legal_storage
- POST sdi.openapi.it/supplier_invoice_imports_legal_storage
- POST sdi.openapi.it/customer_invoice_imports_legal_storage
- POST sdi.openapi.it/simulate-supplier-invoice
-
Sandbox Scopes 20
- GET test.sdi.openapi.it/invoices
- POST test.sdi.openapi.it/invoices
- GET test.sdi.openapi.it/invoices_download
- POST test.sdi.openapi.it/business_registry_configurations
- POST test.sdi.openapi.it/api_configurations
- DELETE test.sdi.openapi.it/api_configurations
- GET test.sdi.openapi.it/api_configurations
- DELETE test.sdi.openapi.it/business_registry_configurations
- GET test.sdi.openapi.it/business_registry_configurations
- GET test.sdi.openapi.it/invoices_notifications
- POST test.sdi.openapi.it/supplier_invoice_imports
- POST test.sdi.openapi.it/customer_invoice_imports
- GET test.sdi.openapi.it/invoices_stats
- PATCH test.sdi.openapi.it/business_registry_configurations
- POST test.sdi.openapi.it/invoices_signature
- POST test.sdi.openapi.it/invoices_legal_storage
- POST test.sdi.openapi.it/invoices_signature_legal_storage
- POST test.sdi.openapi.it/supplier_invoice_imports_legal_storage
- POST test.sdi.openapi.it/customer_invoice_imports_legal_storage
- POST test.sdi.openapi.it/simulate
SDI (1.0.0)
This service allows you to handle interactions with the Italian SDI (Sistema Di Interscambio)
You can configure your account to send invoices directly to the legal storage by setting the api_configuration to your needs
In order to operate, you should register our Recipient Code on the Italian Revenue Agency's website. Please follow this step-by-step guide and provide the following code when needed: JKKZDGR
Create an BusinessRegistryConfiguration with POST /business_registry_configurations for your fiscal_id and your email
A mail will be sent to your address to activate the account on the legal storage platform, if required.
Create an ApiConfiguration for your BusinessRegistryConfiguration with POST /api_configurations. This endpoint can be configured to receive all the notifications with a callback.
Create an XML invoice on the endpoint relative to your configuration
To see an example of the callback objects, plese check the Callbacks tab in the /api_configurations request
Please note that in the English translation:
Customer invoices: Fatture attive
Supplier invoices: Fatture passive
Legal storage: Certificazione a norma
Legal Storage is the service that enables the legal preservation for your documents. All the stored documents are available into the legal storage management software, a third party software.
When creating a BusinessRegistryConfiguration, you will be asked to provide an email address which will be registed on the platform. You will receive an email containing all the steps to complete the registration and access the platform.
If you receive a callback but you have no credit left on your wallet, your account will be temporarily suspended: when this happens, you will be sent a reminder email immediately. In order to re-activate it after a wallet recharge, you would need to submit a PATCH request to /business_registry_configurations/{fiscal_id}/activate
Invoices to the Public Administration are automatically detected and signed.
Create an ApiConfiguration for a fiscal_id
Create the configurations of your callback endpoints.
All the notifications received by SDI will be dispatched to your configured endpoints.
The "fiscal_id" is the unique identifier of the business that you want to configure.
You can create separate endpoints for each event: the event code can be one of "supplier-invoice", "customer-invoice", "customer-notification", "legal-storage-missing-vat", "legal-storage-receipt"
Authorizations:
Request Body schema: application/json
fiscal_id | string |
Array of objects |
Responses
Response Schema: application/json
Array of objects (ApiConfiguration-read) The list of ApiConfiguration created for this fiscal_id | |
message | string |
success | boolean |
error | string <nullable> |
Callbacks
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "fiscal_id": "000133445566",
- "callbacks": [
- {
- "event": "supplier-invoice",
- "auth_header": "Bearer 123456789",
- "field": "data"
Response samples
- 200
- "data": [
- {
- "id": "000133445566",
- "callbacks": [
- {
- "event": "supplier-invoice",
- "auth_header": "Bearer 123456789",
- "field": "data"
- "message": "string",
- "success": true,
- "error": "string"
Callback payload samples
- "event": "customer-invoice",
- "data": {
- "invoice": {
- "uuid": "9b8dddbd-7900-48c6-b159-0f60cc9b413c",
- "created_at": "2022-09-13T10:39:14+00:00",
- "filename": "IT10442360961_06XA6.xml",
- "file_id": 1084646898320,
- "payload": {
- "fattura_elettronica_header": {
- "dati_trasmissione": {
- "id_trasmittente": {
- "id_paese": "IT",
- "id_codice": "10442360961"
- "progressivo_invio": "06V27",
- "formato_trasmissione": "FPR12",
- "codice_destinatario": "123123123",
- "contatti_trasmittente": null,
- "pec_destinatario": null
- "cedente_prestatore": {
- "dati_anagrafici": {
- "id_fiscale_iva": {
- "id_paese": "IT",
- "id_codice": "prova_1663065381275"
- "codice_fiscale": null,
- "anagrafica": {
- "denominazione": "John Doe",
- "nome": null,
- "cognome": null,
- "titolo": null,
- "cod_eori": null
- "albo_professionale": null,
- "provincia_albo": null,
- "numero_iscrizione_albo": null,
- "data_iscrizione_albo": null,
- "regime_fiscale": "RF01"
- "sede": {
- "indirizzo": "Via di Qua, 1",
- "numero_civico": null,
- "cap": "20145",
- "comune": "Milano",
- "provincia": "MI",
- "nazione": "IT"
- "stabile_organizzazione": null,
- "iscrizione_rea": null,
- "contatti": null,
- "riferimento_amministrazione": null
- "rappresentante_fiscale": null,
- "cessionario_committente": {
- "dati_anagrafici": {
- "id_fiscale_iva": {
- "id_paese": "IT",
- "id_codice": "09876543211"
- "codice_fiscale": null,
- "anagrafica": {
- "denominazione": "Jane Doe",
- "nome": null,
- "cognome": null,
- "titolo": null,
- "cod_eori": null
- "sede": {
- "indirizzo": "Via di La, 2",
- "numero_civico": null,
- "cap": "20145",
- "comune": "Milano",
- "provincia": "MI",
- "nazione": "IT"
- "stabile_organizzazione": null,
- "rappresentante_fiscale": null
- "terzo_intermediario_o_soggetto_emittente": null,
- "soggetto_emittente": null
- "fattura_elettronica_body": [
- {
- "dati_generali": {
- "dati_generali_documento": {
- "tipo_documento": "TD01",
- "divisa": "EUR",
- "data": "2018-07-10",
- "numero": "1",
- "dati_ritenuta": null,
- "dati_bollo": null,
- "dati_cassa_previdenziale": null,
- "sconto_maggiorazione": null,
- "importo_totale_documento": null,
- "arrotondamento": null,
- "causale": null,
- "art73": null
- "dati_ordine_acquisto": null,
- "dati_contratto": null,
- "dati_convenzione": null,
- "dati_ricezione": null,
- "dati_fatture_collegate": null,
- "dati_sal": null,
- "dati_ddt": null,
- "dati_trasporto": null,
- "fattura_principale": null
- "dati_beni_servizi": {
- "dettaglio_linee": [
- {
- "numero_linea": 1,
- "tipo_cessione_prestazione": null,
- "codice_articolo": null,
- "descrizione": "Descrizione articolo",
- "quantita": null,
- "unita_misura": null,
- "data_inizio_periodo": null,
- "data_fine_periodo": null,
- "prezzo_unitario": "10.00",
- "sconto_maggiorazione": null,
- "prezzo_totale": "10.00",
- "aliquota_iva": "22.00",
- "ritenuta": null,
- "natura": null,
- "riferimento_amministrazione": null,
- "altri_dati_gestionali": null
- "dati_riepilogo": [
- {
- "aliquota_iva": "22.00",
- "natura": null,
- "spese_accessorie": null,
- "arrotondamento": null,
- "imponibile_importo": "10.00",
- "imposta": "2.20",
- "esigibilita_iva": null,
- "riferimento_normativo": null
- "dati_veicoli": null,
- "dati_pagamento": null,
- "allegati": null
Retrieve a list of ApiConfigurations
Authorizations:
query Parameters
fiscal_id | string Filters for a fiscal_id |
Responses
Response Schema: application/json
Array of objects (ApiConfiguration-read) | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/api_configurations?fiscal_id=SOME_STRING_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "id": "000133445566",
- "callbacks": [
- {
- "event": "supplier-invoice",
- "auth_header": "Bearer 123456789",
- "field": "data"
- "message": "string",
- "success": true,
- "error": "string"
Delete of ApiConfigurations
Authorizations:
path Parameters
id required | string The id of the ApiConfiguration |
Responses
Response Schema: application/json
data | string |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/api_configurations/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": null,
- "message": "Deleted",
- "success": true,
- "error": "string"
Both standard and simplified invoices are supported, to private entities or to the Public Administration
Create an invoice
Create a new invoice and send it to the government channel. You should explicit the request body format using the content-type header. Your invoice will be queued instantly and you will get back the invoice UUID as a callback
Authorizations:
Request Body schema: application/xml
required | object (FatturaPAFatturaElettronicaHeader-read) |
required | Array of objects (FatturaPAFatturaElettronicaBody-read) |
Responses
Response Schema: application/json
object | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
<?xml version="1.0" encoding="UTF-8"?> <p:FatturaElettronica versione="FPR12" > <FatturaElettronicaHeader> <DatiTrasmissione> <IdTrasmittente> <IdPaese>IT</IdPaese> <IdCodice>10442360961</IdCodice> </IdTrasmittente> <ProgressivoInvio>06V27</ProgressivoInvio> <FormatoTrasmissione>FPR12</FormatoTrasmissione> <CodiceDestinatario>Codice destinatario</CodiceDestinatario> </DatiTrasmissione> <CedentePrestatore> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>Codice destinatario</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>John Doe</Denominazione> </Anagrafica> <RegimeFiscale>RF01</RegimeFiscale> </DatiAnagrafici> <Sede> <Indirizzo>Via di Qua, 1</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CedentePrestatore> <CessionarioCommittente> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>09876543211</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>Jane Doe</Denominazione> </Anagrafica> </DatiAnagrafici> <Sede> <Indirizzo>Via di La, 2</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CessionarioCommittente> </FatturaElettronicaHeader> <FatturaElettronicaBody> <DatiGenerali> <DatiGeneraliDocumento> <TipoDocumento>TD01</TipoDocumento> <Divisa>EUR</Divisa> <Data>2018-07-10</Data> <Numero>1</Numero> </DatiGeneraliDocumento> </DatiGenerali> <DatiBeniServizi> <DettaglioLinee> <NumeroLinea>1</NumeroLinea> <Descrizione>Descrizione articolo</Descrizione> <PrezzoUnitario>10.00</PrezzoUnitario> <PrezzoTotale>10.00</PrezzoTotale> <AliquotaIVA>22.00</AliquotaIVA> </DettaglioLinee> <DatiRiepilogo> <AliquotaIVA>22.00</AliquotaIVA> <ImponibileImporto>10.00</ImponibileImporto> <Imposta>2.20</Imposta> </DatiRiepilogo> </DatiBeniServizi> </FatturaElettronicaBody> </p:FatturaElettronica>
Response samples
- 200
- "data": {
- "uuid": "string"
- "message": "",
- "success": true,
- "error": "string"
Create an invoice applying the signature
Create a new invoice and send it to the government channel. You should explicit the request body format using the content-type header. Your invoice will be queued instantly and you will get back the invoice UUID as a callback
Authorizations:
Request Body schema: application/xml
required | object (FatturaPAFatturaElettronicaHeader-read) |
required | Array of objects (FatturaPAFatturaElettronicaBody-read) |
Responses
Response Schema: application/json
object | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
<?xml version="1.0" encoding="UTF-8"?> <p:FatturaElettronica versione="FPR12" > <FatturaElettronicaHeader> <DatiTrasmissione> <IdTrasmittente> <IdPaese>IT</IdPaese> <IdCodice>10442360961</IdCodice> </IdTrasmittente> <ProgressivoInvio>06V27</ProgressivoInvio> <FormatoTrasmissione>FPR12</FormatoTrasmissione> <CodiceDestinatario>Codice destinatario</CodiceDestinatario> </DatiTrasmissione> <CedentePrestatore> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>Codice destinatario</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>John Doe</Denominazione> </Anagrafica> <RegimeFiscale>RF01</RegimeFiscale> </DatiAnagrafici> <Sede> <Indirizzo>Via di Qua, 1</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CedentePrestatore> <CessionarioCommittente> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>09876543211</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>Jane Doe</Denominazione> </Anagrafica> </DatiAnagrafici> <Sede> <Indirizzo>Via di La, 2</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CessionarioCommittente> </FatturaElettronicaHeader> <FatturaElettronicaBody> <DatiGenerali> <DatiGeneraliDocumento> <TipoDocumento>TD01</TipoDocumento> <Divisa>EUR</Divisa> <Data>2018-07-10</Data> <Numero>1</Numero> </DatiGeneraliDocumento> </DatiGenerali> <DatiBeniServizi> <DettaglioLinee> <NumeroLinea>1</NumeroLinea> <Descrizione>Descrizione articolo</Descrizione> <PrezzoUnitario>10.00</PrezzoUnitario> <PrezzoTotale>10.00</PrezzoTotale> <AliquotaIVA>22.00</AliquotaIVA> </DettaglioLinee> <DatiRiepilogo> <AliquotaIVA>22.00</AliquotaIVA> <ImponibileImporto>10.00</ImponibileImporto> <Imposta>2.20</Imposta> </DatiRiepilogo> </DatiBeniServizi> </FatturaElettronicaBody> </p:FatturaElettronica>
Response samples
- 200
- "data": {
- "uuid": "string"
- "message": "",
- "success": true,
- "error": "string"
Create an invoice applying legal storage
Create a new invoice and send it to the government channel. You should explicit the request body format using the content-type header. Your invoice will be queued instantly and you will get back the invoice UUID as a callback
Authorizations:
Request Body schema: application/xml
required | object (FatturaPAFatturaElettronicaHeader-read) |
required | Array of objects (FatturaPAFatturaElettronicaBody-read) |
Responses
Response Schema: application/json
object | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
<?xml version="1.0" encoding="UTF-8"?> <p:FatturaElettronica versione="FPR12" > <FatturaElettronicaHeader> <DatiTrasmissione> <IdTrasmittente> <IdPaese>IT</IdPaese> <IdCodice>10442360961</IdCodice> </IdTrasmittente> <ProgressivoInvio>06V27</ProgressivoInvio> <FormatoTrasmissione>FPR12</FormatoTrasmissione> <CodiceDestinatario>Codice destinatario</CodiceDestinatario> </DatiTrasmissione> <CedentePrestatore> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>Codice destinatario</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>John Doe</Denominazione> </Anagrafica> <RegimeFiscale>RF01</RegimeFiscale> </DatiAnagrafici> <Sede> <Indirizzo>Via di Qua, 1</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CedentePrestatore> <CessionarioCommittente> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>09876543211</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>Jane Doe</Denominazione> </Anagrafica> </DatiAnagrafici> <Sede> <Indirizzo>Via di La, 2</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CessionarioCommittente> </FatturaElettronicaHeader> <FatturaElettronicaBody> <DatiGenerali> <DatiGeneraliDocumento> <TipoDocumento>TD01</TipoDocumento> <Divisa>EUR</Divisa> <Data>2018-07-10</Data> <Numero>1</Numero> </DatiGeneraliDocumento> </DatiGenerali> <DatiBeniServizi> <DettaglioLinee> <NumeroLinea>1</NumeroLinea> <Descrizione>Descrizione articolo</Descrizione> <PrezzoUnitario>10.00</PrezzoUnitario> <PrezzoTotale>10.00</PrezzoTotale> <AliquotaIVA>22.00</AliquotaIVA> </DettaglioLinee> <DatiRiepilogo> <AliquotaIVA>22.00</AliquotaIVA> <ImponibileImporto>10.00</ImponibileImporto> <Imposta>2.20</Imposta> </DatiRiepilogo> </DatiBeniServizi> </FatturaElettronicaBody> </p:FatturaElettronica>
Response samples
- 200
- "data": {
- "uuid": "string"
- "message": "",
- "success": true,
- "error": "string"
Create an invoice applying the signature and legal storage
Create a new invoice and send it to the government channel. You should explicit the request body format using the content-type header. Your invoice will be queued instantly and you will get back the invoice UUID as a callback
Authorizations:
Request Body schema: application/xml
required | object (FatturaPAFatturaElettronicaHeader-read) |
required | Array of objects (FatturaPAFatturaElettronicaBody-read) |
Responses
Response Schema: application/json
object | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
<?xml version="1.0" encoding="UTF-8"?> <p:FatturaElettronica versione="FPR12" > <FatturaElettronicaHeader> <DatiTrasmissione> <IdTrasmittente> <IdPaese>IT</IdPaese> <IdCodice>10442360961</IdCodice> </IdTrasmittente> <ProgressivoInvio>06V27</ProgressivoInvio> <FormatoTrasmissione>FPR12</FormatoTrasmissione> <CodiceDestinatario>Codice destinatario</CodiceDestinatario> </DatiTrasmissione> <CedentePrestatore> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>Codice destinatario</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>John Doe</Denominazione> </Anagrafica> <RegimeFiscale>RF01</RegimeFiscale> </DatiAnagrafici> <Sede> <Indirizzo>Via di Qua, 1</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CedentePrestatore> <CessionarioCommittente> <DatiAnagrafici> <IdFiscaleIVA> <IdPaese>IT</IdPaese> <IdCodice>09876543211</IdCodice> </IdFiscaleIVA> <Anagrafica> <Denominazione>Jane Doe</Denominazione> </Anagrafica> </DatiAnagrafici> <Sede> <Indirizzo>Via di La, 2</Indirizzo> <CAP>20145</CAP> <Comune>Milano</Comune> <Provincia>MI</Provincia> <Nazione>IT</Nazione> </Sede> </CessionarioCommittente> </FatturaElettronicaHeader> <FatturaElettronicaBody> <DatiGenerali> <DatiGeneraliDocumento> <TipoDocumento>TD01</TipoDocumento> <Divisa>EUR</Divisa> <Data>2018-07-10</Data> <Numero>1</Numero> </DatiGeneraliDocumento> </DatiGenerali> <DatiBeniServizi> <DettaglioLinee> <NumeroLinea>1</NumeroLinea> <Descrizione>Descrizione articolo</Descrizione> <PrezzoUnitario>10.00</PrezzoUnitario> <PrezzoTotale>10.00</PrezzoTotale> <AliquotaIVA>22.00</AliquotaIVA> </DettaglioLinee> <DatiRiepilogo> <AliquotaIVA>22.00</AliquotaIVA> <ImponibileImporto>10.00</ImponibileImporto> <Imposta>2.20</Imposta> </DatiRiepilogo> </DatiBeniServizi> </FatturaElettronicaBody> </p:FatturaElettronica>
Response samples
- 200
- "data": {
- "uuid": "string"
- "message": "",
- "success": true,
- "error": "string"
Retrieve collection of Invoice resources.
This endpoint allows retrieving information about invoices. Various query parameters can be specified to filter the results based on user needs.
Query Parameters:
- type (optional): The type of search to be performed. Allowed values: 0 or 1. If 0, invoices where the user is the sender are returned. If 1, invoices where the user is the recipient are returned. If not specified, the default value is 0.
- sender (optional): Specifies the sender of the invoices. It can be a single sender or a list of senders separated by commas.
- recipient (optional): Specifies the recipient of the invoices. It can be a single recipient or a list of recipients separated by commas.
Example: Retrieve all invoices for the user:
GET /invoices?type=1 GET /invoices?type=1&recipient=987654321,123456789 GET /invoices?type=0&sender=123456789,987654321
Note: If type is not specified, the default value is 0, and all invoices for the user of type 0 are returned.
Authorizations:
query Parameters
createdAt[before] | string |
createdAt[strictly_before] | string |
createdAt[after] | string |
createdAt[strictly_after] | string |
signed | boolean |
downloaded | boolean |
toPa | string Search invoices that was sent to PA. |
type | string When type is 0 search for invoices sent to a customer, when type is 1 search for invoice received by a supplier |
sender | string Search by sender (vat number OR fiscal code). You can specify more values at once comma separated. |
recipient | string Search by recipient (vat number OR fiscal code). You can specify more values at once comma separated. |
invoiceDate[before] | string |
invoiceDate[strictly_before] | string |
invoiceDate[after] | string |
invoiceDate[strictly_after] | string |
invoiceNumber | string |
recipient.businessName | string |
recipient.businessVatNumberCode | string |
recipient.businessVatNumberCode[] | Array of strings |
recipient.businessFiscalCode | string |
recipient.businessFiscalCode[] | Array of strings |
sender.businessName | string |
sender.businessVatNumberCode | string |
sender.businessVatNumberCode[] | Array of strings |
sender.businessFiscalCode | string |
sender.businessFiscalCode[] | Array of strings |
marking | string |
marking[] | Array of strings |
page | integer The collection page number |
Responses
Response Schema: application/json
created_at | string <date-time> |
uuid | string |
type | integer |
payload | string |
object (BusinessRegistry-read) | |
object (BusinessRegistry-read) | |
notifications | Array of strings |
sdi_file_name | string |
sdi_file_id | string |
signed | boolean |
legally_stored | boolean |
object (PreservedDocument-read) | |
downloaded | boolean The invoice was downloaded (automatically when received by webhook or manually for polling integrations). |
downloaded_at | string <date-time> |
marking | string The marking represent the current status of the invoice. |
notice | string |
retry_information | string |
transmission_format | string Transmission format specified into the invoice. |
to_pa | boolean |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/invoices?createdAt%5Bbefore%5D=SOME_STRING_VALUE&createdAt%5Bstrictly_before%5D=SOME_STRING_VALUE&createdAt%5Bafter%5D=SOME_STRING_VALUE&createdAt%5Bstrictly_after%5D=SOME_STRING_VALUE&signed=SOME_BOOLEAN_VALUE&downloaded=SOME_BOOLEAN_VALUE&toPa=SOME_STRING_VALUE&type=SOME_STRING_VALUE&sender=SOME_STRING_VALUE&recipient=SOME_STRING_VALUE&invoiceDate%5Bbefore%5D=SOME_STRING_VALUE&invoiceDate%5Bstrictly_before%5D=SOME_STRING_VALUE&invoiceDate%5Bafter%5D=SOME_STRING_VALUE&invoiceDate%5Bstrictly_after%5D=SOME_STRING_VALUE&invoiceNumber=SOME_STRING_VALUE&recipient.businessName=SOME_STRING_VALUE&recipient.businessVatNumberCode=SOME_STRING_VALUE&recipient.businessVatNumberCode%5B%5D=SOME_ARRAY_VALUE&recipient.businessFiscalCode=SOME_STRING_VALUE&recipient.businessFiscalCode%5B%5D=SOME_ARRAY_VALUE&sender.businessName=SOME_STRING_VALUE&sender.businessVatNumberCode=SOME_STRING_VALUE&sender.businessVatNumberCode%5B%5D=SOME_ARRAY_VALUE&sender.businessFiscalCode=SOME_STRING_VALUE&sender.businessFiscalCode%5B%5D=SOME_ARRAY_VALUE&marking=SOME_STRING_VALUE&marking%5B%5D=SOME_ARRAY_VALUE&page=SOME_INTEGER_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- {
- "created_at": "2019-08-24T14:15:22Z",
- "uuid": "string",
- "type": 0,
- "payload": "string",
- "sender": {
- "uuid": "string",
- "head_office_address_street": "string",
- "head_office_address_street_number": "string",
- "head_office_address_zip_code": "string",
- "head_office_address_city": "string",
- "head_office_address_province": "string",
- "head_office_address_country": "string",
- "office_address_street": "string",
- "office_address_street_number": "string",
- "office_address_zip_code": "string",
- "office_address_city": "string",
- "office_address_province": "string",
- "office_address_country": "string",
- "business_vat_number_country": "string",
- "business_vat_number_code": "string",
- "business_fiscal_code": "string",
- "business_name": "string",
- "name": "string",
- "surname": "string",
- "title": "string",
- "cod_eori": "string",
- "professional_register": "string",
- "professional_register_province": "string",
- "professional_register_registration_number": "string",
- "professional_register_registration_date": "2019-08-24T14:15:22Z",
- "tax_regime": "string",
- "contact_phone": "string",
- "contact_fax": "string",
- "contact_email": "string",
- "rea_registration_office": "string",
- "rea_registration_number": "string",
- "rea_registration_share_capital": "string",
- "rea_registration_sole_shareholder": "string",
- "rea_registration_liquidation_status": "string",
- "reference_administration": "string",
- "fiscal_representative_vat_number_country": "string",
- "fiscal_representative_vat_number_code": "string",
- "fiscal_representative_fiscal_code": "string",
- "fiscal_representative_denomination": "string",
- "fiscal_representative_name": "string",
- "fiscal_representative_surname": "string",
- "fiscal_representative_title": "string",
- "fiscal_representative_cod_eori": "string"
- "recipient": {
- "uuid": "string",
- "head_office_address_street": "string",
- "head_office_address_street_number": "string",
- "head_office_address_zip_code": "string",
- "head_office_address_city": "string",
- "head_office_address_province": "string",
- "head_office_address_country": "string",
- "office_address_street": "string",
- "office_address_street_number": "string",
- "office_address_zip_code": "string",
- "office_address_city": "string",
- "office_address_province": "string",
- "office_address_country": "string",
- "business_vat_number_country": "string",
- "business_vat_number_code": "string",
- "business_fiscal_code": "string",
- "business_name": "string",
- "name": "string",
- "surname": "string",
- "title": "string",
- "cod_eori": "string",
- "professional_register": "string",
- "professional_register_province": "string",
- "professional_register_registration_number": "string",
- "professional_register_registration_date": "2019-08-24T14:15:22Z",
- "tax_regime": "string",
- "contact_phone": "string",
- "contact_fax": "string",
- "contact_email": "string",
- "rea_registration_office": "string",
- "rea_registration_number": "string",
- "rea_registration_share_capital": "string",
- "rea_registration_sole_shareholder": "string",
- "rea_registration_liquidation_status": "string",
- "reference_administration": "string",
- "fiscal_representative_vat_number_country": "string",
- "fiscal_representative_vat_number_code": "string",
- "fiscal_representative_fiscal_code": "string",
- "fiscal_representative_denomination": "string",
- "fiscal_representative_name": "string",
- "fiscal_representative_surname": "string",
- "fiscal_representative_title": "string",
- "fiscal_representative_cod_eori": "string"
- "notifications": [
- "string"
- "sdi_file_name": "string",
- "sdi_file_id": "string",
- "signed": true,
- "legally_stored": true,
- "preserved_document": {
- "created_at": "2019-08-24T14:15:22Z",
- "uuid": "string",
- "status": "string",
- "receipt_received_at": "2019-08-24T14:15:22Z",
- "object_type": "string",
- "object_id": "string",
- "message": "string",
- "preserved_object_id": "string",
- "weight": 0
- "downloaded": true,
- "downloaded_at": "2019-08-24T14:15:22Z",
- "marking": "string",
- "notice": "string",
- "retry_information": "string",
- "transmission_format": "string",
- "to_pa": true
Retrieve Invoice resource.
Get an invoice in application/json by default
Authorizations:
path Parameters
uuid required | string |
Responses
Response Schema: application/json
created_at | string <date-time> |
uuid | string |
type | integer |
payload | string |
object (BusinessRegistry-read) | |
object (BusinessRegistry-read) | |
notifications | Array of strings |
sdi_file_name | string |
sdi_file_id | string |
signed | boolean |
legally_stored | boolean |
object (PreservedDocument-read) | |
downloaded | boolean The invoice was downloaded (automatically when received by webhook or manually for polling integrations). |
downloaded_at | string <date-time> |
marking | string The marking represent the current status of the invoice. |
notice | string |
retry_information | string |
transmission_format | string Transmission format specified into the invoice. |
to_pa | boolean |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/invoices/%7Buuid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "created_at": "2019-08-24T14:15:22Z",
- "uuid": "string",
- "type": 0,
- "payload": "string",
- "sender": {
- "uuid": "string",
- "head_office_address_street": "string",
- "head_office_address_street_number": "string",
- "head_office_address_zip_code": "string",
- "head_office_address_city": "string",
- "head_office_address_province": "string",
- "head_office_address_country": "string",
- "office_address_street": "string",
- "office_address_street_number": "string",
- "office_address_zip_code": "string",
- "office_address_city": "string",
- "office_address_province": "string",
- "office_address_country": "string",
- "business_vat_number_country": "string",
- "business_vat_number_code": "string",
- "business_fiscal_code": "string",
- "business_name": "string",
- "name": "string",
- "surname": "string",
- "title": "string",
- "cod_eori": "string",
- "professional_register": "string",
- "professional_register_province": "string",
- "professional_register_registration_number": "string",
- "professional_register_registration_date": "2019-08-24T14:15:22Z",
- "tax_regime": "string",
- "contact_phone": "string",
- "contact_fax": "string",
- "contact_email": "string",
- "rea_registration_office": "string",
- "rea_registration_number": "string",
- "rea_registration_share_capital": "string",
- "rea_registration_sole_shareholder": "string",
- "rea_registration_liquidation_status": "string",
- "reference_administration": "string",
- "fiscal_representative_vat_number_country": "string",
- "fiscal_representative_vat_number_code": "string",
- "fiscal_representative_fiscal_code": "string",
- "fiscal_representative_denomination": "string",
- "fiscal_representative_name": "string",
- "fiscal_representative_surname": "string",
- "fiscal_representative_title": "string",
- "fiscal_representative_cod_eori": "string"
- "recipient": {
- "uuid": "string",
- "head_office_address_street": "string",
- "head_office_address_street_number": "string",
- "head_office_address_zip_code": "string",
- "head_office_address_city": "string",
- "head_office_address_province": "string",
- "head_office_address_country": "string",
- "office_address_street": "string",
- "office_address_street_number": "string",
- "office_address_zip_code": "string",
- "office_address_city": "string",
- "office_address_province": "string",
- "office_address_country": "string",
- "business_vat_number_country": "string",
- "business_vat_number_code": "string",
- "business_fiscal_code": "string",
- "business_name": "string",
- "name": "string",
- "surname": "string",
- "title": "string",
- "cod_eori": "string",
- "professional_register": "string",
- "professional_register_province": "string",
- "professional_register_registration_number": "string",
- "professional_register_registration_date": "2019-08-24T14:15:22Z",
- "tax_regime": "string",
- "contact_phone": "string",
- "contact_fax": "string",
- "contact_email": "string",
- "rea_registration_office": "string",
- "rea_registration_number": "string",
- "rea_registration_share_capital": "string",
- "rea_registration_sole_shareholder": "string",
- "rea_registration_liquidation_status": "string",
- "reference_administration": "string",
- "fiscal_representative_vat_number_country": "string",
- "fiscal_representative_vat_number_code": "string",
- "fiscal_representative_fiscal_code": "string",
- "fiscal_representative_denomination": "string",
- "fiscal_representative_name": "string",
- "fiscal_representative_surname": "string",
- "fiscal_representative_title": "string",
- "fiscal_representative_cod_eori": "string"
- "notifications": [
- "string"
- "sdi_file_name": "string",
- "sdi_file_id": "string",
- "signed": true,
- "legally_stored": true,
- "preserved_document": {
- "created_at": "2019-08-24T14:15:22Z",
- "uuid": "string",
- "status": "string",
- "receipt_received_at": "2019-08-24T14:15:22Z",
- "object_type": "string",
- "object_id": "string",
- "message": "string",
- "preserved_object_id": "string",
- "weight": 0
- "downloaded": true,
- "downloaded_at": "2019-08-24T14:15:22Z",
- "marking": "string",
- "notice": "string",
- "retry_information": "string",
- "transmission_format": "string",
- "to_pa": true
Download a Invoice resource.
You can get an invoice in many different formats just specifying a different Accept header:
- application/xml, you get the XML format
- text/html, you get the invoice formatted with the chosen stylesheet (via X-PrintTheme header, see below)
- application/pdf, same as HTML but as a PDF file
- application/octet-stream, get the raw file (P7M or XML format)
Authorizations:
path Parameters
uuid required | string |
Responses
Response Schema:
created_at | string <date-time> |
uuid | string |
type | integer |
payload | string |
object (BusinessRegistry-read) | |
object (BusinessRegistry-read) | |
notifications | Array of strings |
sdi_file_name | string |
sdi_file_id | string |
signed | boolean |
legally_stored | boolean |
object (PreservedDocument-read) | |
downloaded | boolean The invoice was downloaded (automatically when received by webhook or manually for polling integrations). |
downloaded_at | string <date-time> |
marking | string The marking represent the current status of the invoice. |
notice | string |
retry_information | string |
transmission_format | string Transmission format specified into the invoice. |
to_pa | boolean |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/invoices_download/%7Buuid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Retrieve collection of Invoice notifications.
Retrieve the collection of notifications for a given invoice. You can have the notification message in JSON format or the original XML by sending the Accept HTTP header to either application/json or application/xml
Authorizations:
path Parameters
uuid required | string |
Responses
Response Schema:
uuid | string |
invoice_uuid | string |
created_at | string The date the notification was received. |
type | string The notification type (2 letters code). |
message | string The notification message model. |
downloaded | boolean The notification was downloaded (automatically when received by webhook or manually for polling integrations). |
downloaded_at | string <date-time> Notification download date. |
file_name | string |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/invoices_notifications/%7Buuid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- {
- "uuid": "string",
- "invoice_uuid": "string",
- "created_at": "string",
- "type": "string",
- "message": "string",
- "downloaded": true,
- "downloaded_at": "2019-08-24T14:15:22Z",
- "file_name": "string"
Create a Business Registry Configuration
Authorizations:
Request Body schema: application/json
fiscal_id | string The fiscal code or the vat number WITHOUT the country prefix |
name | string The owner's name for the fiscal id. |
string The email where the owner of the fiscalId will receive communications from the platform. | |
apply_signature | boolean Apply digital signature before sending invoices to SDI. |
apply_legal_storage | boolean Apply the legal storage for invoices sent/received by the fiscal id. |
Responses
Response Schema: application/json
object (BusinessRegistryConfiguration-read) | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "fiscal_id": "string",
- "name": "string",
- "email": "string",
- "apply_signature": true,
- "apply_legal_storage": true
Response samples
- 200
- "data": {
- "id": "xxxxxxxxxxxxx",
- "fiscal_id": "000133445566",
- "name": "My company",
- "apply_signature": true,
- "apply_legal_storage": true
- "message": "string",
- "success": true,
- "error": "string"
Retrieve a list of Business Registry Configuration
Authorizations:
Responses
Response Schema: application/json
Array of objects (BusinessRegistryConfiguration-read) | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/business_registry_configurations"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "id": "xxxxxxxxxxxxx",
- "fiscal_id": "000133445566",
- "name": "My company",
- "apply_signature": true,
- "apply_legal_storage": true
- "message": "string",
- "success": true,
- "error": "string"
Retrieve a Business Registry Configuration
Authorizations:
path Parameters
fiscal_id required | string The fiscal id |
Responses
Response Schema: application/json
object (BusinessRegistryConfiguration-read) | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/business_registry_configurations/%7Bfiscal_id%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "id": "xxxxxxxxxxxxx",
- "fiscal_id": "000133445566",
- "name": "My company",
- "apply_signature": true,
- "apply_legal_storage": true
- "message": "string",
- "success": true,
- "error": "string"
Delete a Business Registry Configuration
Authorizations:
path Parameters
fiscal_id required | string The fiscal id |
Responses
Response Schema: application/json
data | any or null |
message | string |
success | boolean |
error | string or null |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/business_registry_configurations/%7Bfiscal_id%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": null,
- "message": "Deleted",
- "success": true,
- "error": "string"
Re-activate a Business Registry Configuration
This method allows you to re-activate a Business Registry Configuration that was previously deactivated, either automatically or manually by the user.
Authorizations:
path Parameters
fiscal_id required | string The fiscal id |
Responses
Response Schema: application/json
object (BusinessRegistryConfiguration-read) | |
message | string |
success | boolean |
error | string <nullable> |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sdi.openapi.it/business_registry_configurations/%7Bfiscal_id%7D/activate"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "id": "xxxxxxxxxxxxx",
- "fiscal_id": "000133445566",
- "name": "My company",
- "apply_signature": true,
- "apply_legal_storage": true
- "message": "string",
- "success": true,
- "error": "string"
Import customer invoice (fattura attiva)
Import a customer invoice that was already sent to SDI. The invoice will not be sent to SDI. You can disable webhook events by sending X-DisableEndpoints: true header.
Authorizations:
Request Body schema: application/json
The new CustomerInvoiceImport resource
invoice required | string The base64 encoded invoice XML. |
notifications | Array of strings Notification type as key (RC, MC, NS, DT, NE, AT, EC), notification base64 as value. If at least one notification is not provided you must provide invoice_file_name and sdi_id. |
invoice_file_name | string The invoice filename, to be provided only when there is not any notification. |
sdi_id | string The invoice SDI ID, to be provided only when there is not any notification. |
Responses
Response Schema: application/json
uuid | string The UUID used to identify uniquely the invoice. |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "invoice": "string",
- "notifications": {
- "RC": "here the base64 encoded RC notification",
- "NE": "here the base64 encoded NE notification"
- "invoice_file_name": "string",
- "sdi_id": "string"
Response samples
- 201
- "uuid": "string"
Import supplier invoice (fattura passiva)
Import a supplier invoice that was already received from SDI.
Authorizations:
Request Body schema:
The new SupplierInvoiceImport resource
invoice required | string The base64 encoded invoice XML. |
metadata | string The base64 encoded invoice metadata XML. If it is not provided you must provide invoice_file_name and sdi_id. |
invoice_file_name | string The invoice filename, to be provided only when there is not metadata. |
sdi_id | string he invoice SDI ID, to be provided only when there is not metadata. |
Responses
Response Schema:
uuid | string The UUID used to identify uniquely the invoice. In case the invoice XML embeds multiple bodies, you will get an array of UUIDs. |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "invoice": "string",
- "metadata": "string",
- "invoice_file_name": "string",
- "sdi_id": "string"
Response samples
- 201
- "uuid": "string"
Import customer invoice (fattura attiva)
Import a customer invoice that was already sent to SDI. The invoice will not be sent to SDI, but it will be sent to the legal storage. You can disable webhook events by sending X-DisableEndpoints: true header.
Authorizations:
Request Body schema: application/json
The new CustomerInvoiceImport resource
invoice required | string The base64 encoded invoice XML. |
notifications | Array of strings Notification type as key (RC, MC, NS, DT, NE, AT, EC), notification base64 as value. If at least one notification is not provided you must provide invoice_file_name and sdi_id. |
invoice_file_name | string The invoice filename, to be provided only when there is not any notification. |
sdi_id | string The invoice SDI ID, to be provided only when there is not any notification. |
Responses
Response Schema: application/json
uuid | string The UUID used to identify uniquely the invoice. |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "invoice": "string",
- "notifications": {
- "RC": "here the base64 encoded RC notification",
- "NE": "here the base64 encoded NE notification"
- "invoice_file_name": "string",
- "sdi_id": "string"
Response samples
- 201
- "uuid": "string"
Import supplier invoice (fattura passiva)
Import a supplier invoice that was already received from SDI. The invoice will be sent to the legal storage
Authorizations:
Request Body schema:
The new SupplierInvoiceImport resource
invoice required | string The base64 encoded invoice XML. |
metadata | string The base64 encoded invoice metadata XML. If it is not provided you must provide invoice_file_name and sdi_id. |
invoice_file_name | string The invoice filename, to be provided only when there is not metadata. |
sdi_id | string he invoice SDI ID, to be provided only when there is not metadata. |
Responses
Response Schema:
uuid | string The UUID used to identify uniquely the invoice. In case the invoice XML embeds multiple bodies, you will get an array of UUIDs. |
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "invoice": "string",
- "metadata": "string",
- "invoice_file_name": "string",
- "sdi_id": "string"
Response samples
- 201
- "uuid": "string"
Simulate supplier invoice in Sandbox (fattura passiva)
here you must send an invoice as the payload, it will be delivered to your configured endpoints for the event supplier-invoice. It doesn't matter the codice_destintario, you will receive the invoice to your account. The body must contain a valid Invoice payload. This service in valid only in Sandbox
Authorizations:
Request Body schema: application/json
id_codice in cessionario_committente.dati_anagrafici.id_fiscale_iva is required and is the fiscal_id
object | |
Array of objects |
Responses
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "fattura_elettronica_header": {
- "dati_trasmissione": {
- "codice_destinatario": "1234567"
- "cedente_prestatore": {
- "dati_anagrafici": {
- "id_fiscale_iva": {
- "id_paese": "IT",
- "id_codice": "12345678901"
- "anagrafica": {
- "denominazione": "John Doe"
- "regime_fiscale": "RF01"
- "sede": {
- "indirizzo": "Via di Qua, 1",
- "cap": "20145",
- "comune": "Milano",
- "provincia": "MI",
- "nazione": "IT"
- "cessionario_committente": {
- "dati_anagrafici": {
- "id_fiscale_iva": {
- "id_paese": "IT",
- "id_codice": "09876543211"
- "anagrafica": {
- "denominazione": "Jane Doe"
- "sede": {
- "indirizzo": "Via di La, 2",
- "cap": "20145",
- "comune": "Milano",
- "provincia": "MI",
- "nazione": "IT"
- "fattura_elettronica_body": [
- {
- "dati_generali": {
- "dati_generali_documento": {
- "tipo_documento": "TD01",
- "divisa": "EUR",
- "data": "2018-07-10",
- "numero": "1"
- "dati_beni_servizi": {
- "dettaglio_linee": [
- {
- "numero_linea": 1,
- "descrizione": "Descrizione articolo",
- "prezzo_unitario": "10.00",
- "prezzo_totale": "10.00",
- "aliquota_iva": "22.00"
- "dati_riepilogo": [
- {
- "aliquota_iva": "22.00",
- "imponibile_importo": "10.00",
- "imposta": "2.20"
Response samples
- 200
- 400
- 401
- 500
- "success": "true",
- "message": "",
- "error": "null"