Invoices
An invoice is elegible for the preservation when these conditions are satisfied:
- The legal storage is enabled in your contract.
-
In case of customer invoices:
-
The supplier vat number is registered into the
BusinessRegistryConfiguration
and has theapply_legal_storage
flag set totrue
. -
OR the
X-Apply-LegalStorage: true
header is sent.
-
The supplier vat number is registered into the
-
In case of supplier invoices:
-
The customer vat number or fiscal code is registered into the
BusinessRegistryConfiguration
and has theapply_legal_storage
flag set totrue
.
-
The customer vat number or fiscal code is registered into the
An invoice is sent effectively to the legal storage when is elegible for the preservation and:
-
In case of customer invoices:
-
A notification
RC
orMC
is received in case of B2B invoices. -
A notification
NE
,DT
orAT
is received in case of PA invoices.
-
A notification
-
In case of supplier invoices or extra SDI invoices:
- The invoice is sent to the legal storage as soon as it is received.
Customer invoices are sent to the preservation together with all the received notifications (except for NS notifications).
Once the legal storage takes in charge the document we will receive a receipt, a signed XML document that certifies the invoice has been processed. You can get the receipt by invoking the API GET /preserved-documents/{uuid}/receipt.
You can receive a realtime notification when a document receives a receipt by declaring an ApiConfiguration for the event legal-storage-receipt.
You will receive a JSON document for the PreservedDocument
which received the receipt.
You can get the PreservedDocument
for an invoice using the API GET /invoices/{uuid}/preserved-document.
You will get the same information also in the details of an invoice within the preserved_document
key.