SDI Electronic Invoicing

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.

Useful tips to start with SDI Electronic Invoicing

Get the token in the appropriate section before you start.

Use the the online tool or generate it via API. Set the expire date, a usefull name and now add a bunch of scopes to limit the possible actions your token can do.

Configure the company

Configure the company with /business_registry_configurations, choosing between regular, signed, or signed and archived invoices. If you choose to enable archiving, the credentials will be sent to the email address provided during configuration. Note that the email address and VAT number are unique. This operation should only be performed when setting up the company for the first time.

Configure notifications to manage approvals and rejections

Configure callbacks with /api_configurations, setting one or more of these options if needed: 'supplier-invoice' (passive invoice), 'customer-invoice' (active invoice), 'customer-notification' (reject or accept notification), 'legal-storage-missing-vat', 'legal-storage-receipt' (archival receipt). In this way, you will receive a call with the invoice object directly to the URL you provided.
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

Use the endpoints /invoices, /invoices_signature, /invoices_legal_storage, or /invoices_signature_legal_storage based on your needs. They allow you to send the invoice in either XML (compatible with the XML invoicing standard) or JSON format.
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

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

Before we begin

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

Get started:

  1. Create an BusinessRegistryConfiguration with POST /business_registry_configurations for your fiscal_id and your email

  2. A mail will be sent to your address to activate the account on the legal storage platform, if required.

  3. Create an ApiConfiguration for your BusinessRegistryConfiguration with POST /api_configurations. This endpoint can be configured to receive all the notifications with a callback.

  4. 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

Reactivating a BusinessRegistryConfiguration

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

Interacting with the Public Administration (PA)

Invoices to the Public Administration are automatically detected and signed.

ApiConfigurations

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:
bearerAuth
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

Content type
application/json
{
  • "fiscal_id": "000133445566",
  • "callbacks": []
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Callback payload samples

Callback
POST: {your_url}
Content type
application/json
Example
{
  • "event": "customer-invoice",
  • "data": {
    }
}

Retrieve a list of ApiConfigurations

Authorizations:
bearerAuth
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

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

Content type
application/json
{
  • "data": [
    ],
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Delete of ApiConfigurations

Authorizations:
bearerAuth
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

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

Content type
application/json
{
  • "data": null,
  • "message": "Deleted",
  • "success": true,
  • "error": "string"
}

Create invoices

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:
bearerAuth
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

Content type
application/xml
<?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

Content type
application/json
{
  • "data": {
    },
  • "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:
bearerAuth
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

Content type
application/xml
<?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

Content type
application/json
{
  • "data": {
    },
  • "message": "",
  • "success": true,
  • "error": "string"
}

Invoices

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:
bearerAuth
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
Array
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

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

Content type
application/json
[
  • {
    }
]

Retrieve Invoice resource.

Get an invoice in application/json by default

Authorizations:
bearerAuth
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

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

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "uuid": "string",
  • "type": 0,
  • "payload": "string",
  • "sender": {
    },
  • "recipient": {
    },
  • "notifications": [
    ],
  • "sdi_file_name": "string",
  • "sdi_file_id": "string",
  • "signed": true,
  • "legally_stored": true,
  • "preserved_document": {
    },
  • "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:
bearerAuth
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

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:
bearerAuth
path Parameters
uuid
required
string

Responses

Response Schema:
Array
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

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

Content type
[
  • {
    }
]

BusinessRegistryConfiguration

Create a Business Registry Configuration

Authorizations:
bearerAuth
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.

email
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

Content type
application/json
{
  • "fiscal_id": "string",
  • "name": "string",
  • "email": "string",
  • "apply_signature": true,
  • "apply_legal_storage": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Retrieve a list of Business Registry Configuration

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects (BusinessRegistryConfiguration-read)
message
string
success
boolean
error
string <nullable>

Request samples

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

Content type
application/json
{
  • "data": [
    ],
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Retrieve a Business Registry Configuration

Authorizations:
bearerAuth
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

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

Content type
application/json
{
  • "data": {
    },
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Delete a Business Registry Configuration

Authorizations:
bearerAuth
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

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

Content type
application/json
{
  • "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:
bearerAuth
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

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

Content type
application/json
{
  • "data": {
    },
  • "message": "string",
  • "success": true,
  • "error": "string"
}

Import

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:
bearerAuth
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

Content type
application/json
{
  • "invoice": "string",
  • "notifications": {
    },
  • "invoice_file_name": "string",
  • "sdi_id": "string"
}

Response samples

Content type
application/json
{
  • "uuid": "string"
}

Import supplier invoice (fattura passiva)

Import a supplier invoice that was already received from SDI.

Authorizations:
bearerAuth
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

Content type
{
  • "invoice": "string",
  • "metadata": "string",
  • "invoice_file_name": "string",
  • "sdi_id": "string"
}

Response samples

Content type
{
  • "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:
bearerAuth
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

Content type
application/json
{
  • "fattura_elettronica_header": {
    },
  • "fattura_elettronica_body": [
    ]
}

Response samples

Content type
application/json
{
  • "success": "true",
  • "message": "",
  • "error": "null"
}