Italy
Enabling support for Italy involves confirming prerequisites and product IDs, registering with the Agenzia delle Entrate tax authority, and setting up credentials.
Prerequisites
-
A valid VAT number
-
A Codice Destinatario assigned to the Hub
-
A Codice Fiscale, issued by the Agenzia delle Entrate tax authority
Resources
Official government resources that include detailed and valuable information on various topics:
Available products
-
it_FatturaPA__1.2.2
Codice Destinario configuration
The ability to receive documents depends on obtaining a Codice Destinatario and assigning it to the Hub.
Sovos direct customers use a Sovos-assigned codice destinatario, which may be distributed to buyers and suppliers alike, so all parties agree on how a FatturaPA must be addressed. The Codice Destinatario belongs to Sovos, but its usage is limited to that of the assigned Hub. This code, together with the VAT and Codice Fiscale numbers, is what Sovos uses to identify and route each incoming FatturaPA to the responsible Hub.
Buyers can register a single destination address for all of their e-invoices with the Italian Agency of Revenue, regardless of which address is specified on incoming FatturaPA. This is a useful option for Buyers who want to nominate their Hubs as the sole invoicing channel, in which case they should supply the Codice Destinatario assigned by Sovos to the Italian Agency of Revenue.
Configure credentials for Italy
Issue invoice
Invoice clearance in Italy is based on the Default business process, which follows this order: Mapping, Signing, and Transmission.
The following diagrams provide a detailed overview of B2B and B2G workflows.
Step 1: Supplier creates the Standard Business Document
Every invoice sent to Sovos must be part of a Standard Business Document (SBD). This document includes a Standard Business Document Header (SBDH) and a Sovos Document node, which in turn includes a Sovos Canonical Invoice (SCI). To create the SBD, follow the detailed instructions in the SBDH, Sovos Document, and SCI pages. Here are some key elements that should be included in the SBD and in the invoice.
Use the following values in the SBDH for documents that use the SCI format:
Node | Required | Attributes | Value |
---|---|---|---|
StandardBusinessDocumentHeader.Sender.Identifier | Yes | Authority="IT" | Supplier's tax ID |
StandardBusinessDocumentHeader.Receiver.Identifier | Yes | Authority="IT" | |
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 | |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 2.1 | |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | Invoice | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Country Child node Identifier: IT | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: ProcessType Child node Identifier: Outbound | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: CompanyCode Child node Identifier: Supplier's tax ID | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: SenderDocumentId Child node Identifier: A unique document ID, typicallyy the ERP document ID | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: SenderSystemId Child node Identifier: The system ID configured in the backend. This parameter is used to determine which notifications are returned to the client and what attachments they include. If | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Mapping.OutputSchema Child node Identifier: FatturaPA | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Mapping.TransformDocument Child node Identifier: SCI-TO-LEGAL_INVOICE | |
StandardBusinessDocumentHeader.BusinessScope.Scope.BusinessService.BusinessServiceName | Yes | Default | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes | Child node Type: SubSchema | |
SovosDocument.SovosCanonicalInvoice.Invoice | Yes | SCI | |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Version Child node Identifier: 1.2.2 |
Alternatively, the supplier can use the local format (XML) instead of SCI. Use the following values in the SBDH for documents that use the local format:
Node | Required | Value |
---|---|---|
StandardBusinessDocumentHeader.DocumentIdentification.Standard | Yes | https://www.fatturapa.gov.it/it/norme-e-regole/documentazione-fattura-elettronica/formato-fatturapa/ |
StandardBusinessDocumentHeader.DocumentIdentification.TypeVersionStandardBusinessDocumentHeader.DocumentIdentification.TypeVersion | Yes | 1.2.2 |
StandardBusinessDocumentHeader.DocumentIdentification.Type | Yes | FatturaPA |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Mapping.TransformDocument Child node Identifier: LEGAL-TO-SCI_INVOICE |
StandardBusinessDocumentHeader.BusinessScope.Scope (with child nodes) | Yes |
Child node Type: Mapping.OutputSchema Child node Identifier: FatturaPA |
SovosDocument.SovosLegalDocument.Base64Document | Yes | The Base64-encoded XML invoice (see the following sample image) |
Here is a sample of the SovosDocument.SovosLegalDocument.Base64Document node:
<svs:SovosDocument>
<svs:SovosLegalDocument>
<enc:Base64Document>
<enc:EmbeddedDocument id="1" filename="invoice.xml" mimeCode="application/xml">
PD94bWwgdmVyc21...DOog
- Local format (XML) requirements
- When using the local format, follow these rules:
Node Include Notes FatturaElettronica.FatturaElettronicaHeader. DatiTrasmissione.IdTrasmittente No FatturaElettronica.FatturaElettronicaHeader.DatiTrasmissione.ProgressivoInvio No FatturaElettronica.FatturaElettronicaHeader.TerzoIntermediarioOSoggettoEmittente No FatturaElettronica.FatturaElettronicaHeader.SoggettoEmittente Only for self-billed invoices To issue a self-billed invoice, add this node with the value "CC". When this node is not present, "TZ" is used as the default value. FatturaElettronica.Signature No - Sales and Purchase Invoices related to San Marino
- Invoices sent to companies established in San Marino must contain the following values:
-
CodiceDestinatario: "2R4GTO8"
-
TipoDocumento: "TD24"
-
Natura: "N3.3"
As of October 1, 2022, purchase invoices received on paper from San Marino must be reported using TipoDocumento: "TD28".
-
- Supported document types for the Local Format (XML) document
-
-
TD01: Invoice
-
TD02: Advance/down payment on invoice
-
TD03: Advance/down payment on fee
-
TD04: Credit Note
-
TD05: Debit Note
-
TD06: Fee
-
TD16: Reverse charge internal invoice integration
-
TD17: Integration/self invoicing for purchase services from abroad
-
TD18: Integration for purchase of intra UE goods
-
TD19: Integration/self invoicing for purchase of goods ex art.17 c.2 DPR 633/72
-
TD20: Self invoicing for regularization and integration of invoices (ex art.6 c.8 and 9-bis d.lgs 471/97 or art.46 c.5 D.L. 331/93)
-
TD21: Self invoicing for splaphoning
-
TD22: Extractions of goods from VAT Warehouse
-
TD23: Extractions of goods from VAT Warehouse with payment of VAT
-
TD24: Deferred invoice ex art.21, c.4, third period lett. a) DPR 633/72
-
TD25: Deferred invoice ex art.21, c.4, third period lett. b) DPR 633/72
-
TD26: Sale of depreciable assets and for internal transfers (ex art.36 DPR 633/72)
-
TD27: Self invoicing for self consumption or for free transfer without recourse
-
TD28: Purchases from San Marino with VAT (paper invoice)
-
Include all the mandatory nodes as specified in the SBDH schema. If the information cannot be provided, you must include an empty node in the SBDH.
- SBD Sample
- Below is a sample of the SBD. In addition, there's a full sample of the SBD in the Postman Samples page.
<sbd:StandardBusinessDocument xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:sbd="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:ad="http://www.sovos.com/namespaces/additionalData" xmlns:sci="http://www.sovos.com/namespaces/sovosCanonicalInvoice" xmlns:svs="http://www.sovos.com/namespaces/sovosDocument" xmlns:sov="http://www.sovos.com/namespaces/sovosExtensions" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"> <sbd:StandardBusinessDocumentHeader> <sbd:HeaderVersion>1.0</sbd:HeaderVersion> <sbd:Sender> <sbd:Identifier Authority="IT">123456789</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>123456789</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Sender> <sbd:Receiver> <sbd:Identifier Authority="IT">444555666</sbd:Identifier> <sbd:ContactInformation> <sbd:Contact>444555666</sbd:Contact> <sbd:EmailAddress/> <sbd:FaxNumber/> <sbd:TelephoneNumber/> <sbd:ContactTypeIdentifier/> </sbd:ContactInformation> </sbd:Receiver> <sbd:DocumentIdentification> <sbd:Standard>urn:oasis:names:specification:ubl:schema:xsd:Invoice-2</sbd:Standard> <sbd:TypeVersion>2.1</sbd:TypeVersion> <sbd:InstanceIdentifier/> <sbd:Type>Invoice</sbd:Type> <sbd:MultipleType>false</sbd:MultipleType> <sbd:CreationDateAndTime>2022-06-16T00:31:52Z</sbd:CreationDateAndTime> </sbd:DocumentIdentification> <sbd:BusinessScope> <sbd:Scope> <sbd:Type>Version</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>1.2.2</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderDocumentId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>321412</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SenderSystemId</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SystemERP</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>CompanyCode</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>444555666</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Country</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>IT</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>ProcessType</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>Outbound</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.TransformDocument</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>SCI-TO-LEGAL_INVOICE</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>Mapping.OutputSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier>FatturaPA</sbd:Identifier> </sbd:Scope> <sbd:Scope> <sbd:Type>SubSchema</sbd:Type> <sbd:InstanceIdentifier/> <sbd:Identifier /> </sbd:Scope> <sbd:Scope> <sbd:Type>BusinessProcess</sbd:Type> <sbd:InstanceIdentifier/> <sbd:BusinessService> <sbd:BusinessServiceName>Default</sbd:BusinessServiceName> </sbd:BusinessService> </sbd:Scope> </sbd:BusinessScope> </sbd:StandardBusinessDocumentHeader> <svs:SovosDocument> <sci:SovosCanonicalInvoice> <inv:Invoice> *UBL Elements* </inv:Invoice> </sci:SovosCanonicalInvoice> </svs:SovosDocument> </sbd:StandardBusinessDocument>
Step 2: Supplier sends the SBD to Sovos
The supplier sends a POST request to the /documents
endpoint.
The request must include the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
data | string | Yes | Set it to the SBD encoded in Base64, as created in step 1. |
dataEncoding | string | Yes | Always set it to "base64". |
After receiving the document, Sovos performs a structure/schema validation of both the SCI and the SBD parts.
- Request Sample
-
curl --location --request POST 'https://api-test.sovos.com/v1/documents' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: 057b5a5e-...-9d583b4d121c' \ --data-raw '{ "data": "PD9...d4=", "dataEncoding" : "base64" }'
- Response Sample
-
{ "status": 202, "message": "Accepted", "success": true, "timestamp": 1684270247645, "data": { "transactionId": "813d91ef-...-f98c09aa1157", "documentId": "350...550" } }
Step 3: Sovos Maps the SCI into FatturaPA
Upon receiving the SCI, Sovos maps the file into the required FatturaPA format.
Step 4: Sovos Signs the document
Once the document is ready, it is signed with the qualified seal certificate.
Step 5: Sovos Transmits the document
After signing the FatturaPA file, Sovos transmits it to the tax authority's e-Invoice system (SDI).
Step 6: SDI Processes the document
SDI validates the schema several business requirements. Then, SDI generates an approval or rejection response message that includes an error message, when applicable.
Step 7: SDI Sends the Response to Sovos
This step varies depending on the type of transaction: B2B or B2G.
After performing its services, the SDI sends the response to Sovos. The system then returns multiple status messages while processing the document. Here is a diagram of this step:
The customer must continue polling until a "final" status notification is received. In cases where the SDI cannot reach the buyer, it may take up to five days to receive a non-reachable notification.
In a B2G transaction, the supplier must continuously poll for notifications until an acceptance or rejection is received from the buyer. If the buyer does not respond within 15 days, the SDI will send a message stating that the deadline has passed, which can be considered an implicit acceptance. Here is a diagram of this step:
Step 8: Supplier Retrieves the Application Responses
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is "download links".
-
When using "download links" the response contains a URL from where the file can be downloaded.
-
When using "binary data", the file itself is embedded in the response encoded in base64.
This configuration is available through our Professional Services team.
As a response to the initial sending of the document, the client will receive a JSON response message with an HTTP status code of 202 (asynchronous transaction). This means that the supplier must retrieve the application responses that become available during the transaction, which provide status information and also contain the signed XML encoded in Base64 — once it's available during the process. Additionally, the following details included in the response must be considered:
Transmission Message: It maps to the SCIGovtStatusCode
and StatusReason
elements in the response message, as described in the Application Responses section, which details any warnings or additional notes to consider. The Italian tax authority doesn't define any specific set of rules about what action to take on each error. Depending on the type of message, the user may have to modify the invoice, take some additional action, or simply make a note for the future.
For each invoice, the following fields must be unique inside the invoice payload:
-
Invoice Date
-
Invoice Number
-
Document Type
-
Supplier Identification
Clients have the option to retrieve application responses (notifications) in one of two ways:
- Fetch everything in one single response (notification)
- This means, when polling for responses, Sovos will only return one final notification with
SCICloudStatusCode 209
that contains all the relevant attachments/data. Detailed description follows. - Fetch multiple responses (notifications) containing different information
- In this case, when polling for responses, Sovos will return multiple notifications with different
SCICloudStatusCode
values containing different attachments/data until the final one (with status 209) is returned. Detailed description follows.
In case these fields are not unique, the ApplicationResponse will contain the following error for the subsequent invoices: "Processing of another operation with identical identifier(s) has already been initiated."
In order to configure notifications for your company, or update your current configuration, contact our Professional Services team.
To complete a transaction, the supplier retrieves only one notification, the complete workflow one, with SCICloudStatusCode
of 209 and all the necessary attachments/data. Afterwards, the notification needs to be parsed for SCIResponseCode
value. Possible values for SCIResponseCode
:
-
"AP", meaning the document's compliance status has been accepted with all the necessary attachments/data present.
-
"RE", meaning the document's compliance status has been rejected, and more parsing is needed:
-
if
SCIGovtStatusCode
is present, the error can be found by readingStatusReason
-
if
SCIInternalValidationCode
is present, the error can be found by readingStatusReason
-
Receiving a notification containing SCICloudStatusCode
with a value in the 5xx range, still remains an option as it indicates a server error. In this case, the workflow would not be considered complete since it would not return a notification with SCICloudStatusCode
of 209.
SCICloudStatusCode | SCIResponseCode | Sample |
---|---|---|
209 | AP | Workflow successfully completed |
209 | RE | Workflow successfully completed |
To complete a transaction, the supplier must retrieve the application responses until the transaction has finished. If the supplier has subscribed to all notifications, the transaction can generate different application responses, as shown in the table below:
The supplier can use the following COAPI endpoints to retrieve application responses:
-
GET /notifications/IT
-
GET /documents/IT/{documentId}/notifications
We'll discuss these endpoints in the following subsections.
Clients need to make sure they receive all these attachments (via notifications) to be compliant:
-
OutcomeNotice
-
DeadlinePassedNotice
-
FailedDeliveryAttestation
-
DeliveryReceipt
-
FailedDeliveryNotice
-
RejectionNotice
In addition, here is a workflow diagram explaining when certain attachments (as part of the notifications) become available:
In the B2B case, there is one response that comes from the Tax Authority.
In the B2G case, there are usually multiple responses that come from the Tax Authority:
- GET/Notifications/IT
-
The supplier can send a
GET
request to the/notifications/IT
endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:Name Type Required Default Description taxId string No Set it to include only notifications related to the specified taxId. This value relates to the CompanyCode set in the SBDH.
Note:If a request doesn't include this parameter, it will return all the notifications related to the country and the sourceSystemId parameter.
page integer No 1 To specify the page to be returned, set the value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, set its value between 1 and 100.
Important:If the attachment file is configured to return the binary content, instead of a link, it's recommended to use only values between 1 and 10.
sourceSystemId string Yes Set it to include only notifications related to documents that originate from the given source system. This value is related to the SenderSystemId in the SBDH. includeAckwnowledged boolean No false Set it to "true" to specify whether previously acknowledged notifications, within 24 hours of their acknowledgment, must be included in the result. processType string No Set it to "0" to only include notifications related to outbound documents. - Request Sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/IT?page=1&perPage=2&taxId={taxId}&sourceSystemId={sourceSystemId}&processType=0' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: 057b5a5e-...-9d583b4d121c'
- Response Sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "it_FatturaPA__1.2.2", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-...-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
- GET /documents/IT/{documentId}/notifications
-
The supplier can send a
GET
request to the/documents/IT/{documentId}/notifications
To make this request, set the following parameter:
Name Type Required Parameter Type Description documentId string Yes Path Set it to the ID of the document returned in step 2 - Request Sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/documents/IT/{documentId}/notifications?' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: 6d49dcfe-...-44f4e720d70b'
- Response Sample
-
{ "timestamp": 1633685509314, "status": 200, "success": true, "message": "Notifications Listed", "data": { "pageState": { "page": 1, "perPage": 50, "totalEntries": 1 }, "notifications": [ { "createdDate": 1633681296, "metadata": { "productId": "it_FatturaPA__1.2.2", "documentId": "DOCUMENT-ID", "erpDocumentId": "ERP-DOCUMENT-ID", "erpSystemId": "SystemERP", "processType": "0", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "200", "sciResponseCode": "AP", "sciStatusAction": "NOA", "sciGovtStatusCode": "100" }, "appPrefix": "DLT", "notificationId": "a8dc1aa2-...-97a3d5fdb91c", "content": "PEF...NlPg==" } ] } }
Step 9: Supplier Marks the Application Responses as Acknowledged
After retrieving application responses, the supplier must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/IT
endpoint. To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set it to "read". |
notificationId | string | Yes | Set it to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId values can be acknowledged using one COAPI call by including them in a single request.
- Request Sample
-
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/IT' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: 057b5a5e-...-9d583b4d121c' \ --data-raw '[ { "status": "read", "notificationId": "51341d39-...-a73d73e0de76" } ]'
- Response Sample
-
{ "timestamp": 1601673284, "status": 200, "success": true, "message": "Notifications acknowledged successfully." }
PDF generation
Sovos generates a PDF that presents the content of the invoice XML in a human-readable format that follows the official SDI stylesheet.
Archiving
It's possible to compliantly archive the XML, the application response, and any graphical representation (i.e., PDF) using Sovos' Compliant Archive. However, this will not be done automatically as part of the clearance process. Instead, customers need to perform their own archiving using our Archiving resource (see also our eArchiving integration guide).
SDI sends the invoice to the buyer
Sovos does not handle the delivery of the invoice to the buyer. Once the document is processed, the SDI sends it directly to the buyer.
Error Handling
Customers need to adhere to the error handling principles outlined on the responses page.
In general, all error codes in the 400 range are client errors, so the customer needs to analyze them. After fixing the error, it's possible to resend the request. Error codes 408 and 429 are exceptions: in these cases, customers should wait at least 60 seconds before retrying. The error codes in the 500 range are server errors. In that case, customers need to resend the request, according to the instructions given on the responses page, which also includes a full list of error codes the COAPI can return. This government web page contains documentation about the API that includes all the error codes and messages that can be returned, and can be used for error handling.
Retrieve invoice
The diagram below provides a detailed overview of the inbound flow process for e-invoice retrieval in Italy:
Step 1: Sovos Retrieves Documents from the SDI
Sovos receives the inbound FatturaPA documents from SDI for any destination code generated by Sovos.
If you are a Sovos partner, you can have your dedicated destination code. Otherwise, the destination code value for UAT environment is DELTADI, whereas for Production it is 1BM91M1.
Step 2: Sovos Maps the FatturaPA into SCI
Upon receiving the FatturaPA, Sovos maps the file into the SCI format.
Step 3: Sovos Makes the Documents Available
Sovos stores the retrieved documents and makes them available for the buyers to fetch them. The PDF version of these documents is also made available, which follows the official SDI stylesheet.
Step 4: Buyer Retrieves the Available Documents
It is highly recommended that clients configure their Application Response attachments as download links instead of base64 encoded data to avoid potential size limitations when retrieving responses. The default option is download links.
-
When using download links the response contains a URL from where the file can be downloaded.
-
When using binary data, the file itself is embedded in the response encoded in base64.
This configuration is available through our Professional Services team.
The buyer can use the following COAPI endpoint to retrieve the application responses:
GET /v1/notifications/IT
To complete a transaction, the buyer must retrieve the application responses until the transaction has finished. If the buyer has subscribed to all notifications, the transaction can generate different application responses, as shown in the following table:
SCICloudStatusCode | SCIResponseCade | Sample |
---|---|---|
100 | IP | Document received successfully |
101 | IP | Document mapped successfully |
209 | AP | Workflow successfully completed |
- GET /notifications/IT
-
The buyer can send a
GET
request to the/notifications/IT
endpoint to retrieve application responses that match the set search criteria. This endpoint allows setting the following query parameters:Name Type Required Default Description taxId string No Set it to include only notifications related to the specified taxId.
Note:This parameter is required for Sovos' direct customers, and optional for hub partners.
page integer No 1 To specify the page to be returned, set the value between 1 and 10. perPage integer No 10 To specify the number of results for the returned page, set its value between 1 and 100. Important:If the attachment file is configured to return the binary content, instead of a link, it's recommended to use only values between 1 and 10.
sourcesystemId string Yes Set it to include only notifications related to documents that originate from the given source system. includeAcknowledged boolean No false Set it to "true" to specify whether previously acknowledged notifications must be included in the result. processType string No Set it to "1" to only include notifications related to inbound documents. - Request Sample
-
curl --location --request GET 'https://api-test.sovos.com/v1/notifications/IT?processType=1&sourceSystemId=YOUR-SYSTEM&taxId=YOUR-TAXID' \ --header 'x-correlationId: developer-guide'
- Response Sample
-
{ "status": 200, "message": "Notifications Listed", "success": true, "timestamp": 0, "data": { "pageState": { "page": 1, "perPage": 10, "totalEntries": 1, "totalPages": 1 }, "notifications": [ { "notificationId": "ba056226-...-a111e24acd51", "correlationId": "49a75544-...-5f672c2a814d", "appPrefix": "DLT", "metadata": { "productId": "TBD", "transactionId": "47514154-...-77a72ab75731", "documentId": "04c...151", "erpDocumentId": "YOUR-DOCUMENT-ID", "erpSystemId": "YOUR-SYSTEMERP", "processType": "1", "taxId": "YOUR-TAXID", "sciCloudStatusCode": "209", "sciResponseCode": "AP", "sciStatusAction": "NOA" }, "content": "PD...T4=", "createdDate": 1674572920 } ] } }
Step 5: Buyer Acknowledges the Retrieved Documents
After retrieving the documents, the buyer must process them and mark them as acknowledged. This can be done by sending a PUT
request to the /notifications/IT
endpoint.
To make this request, set the following request body parameters:
Name | Type | Required | Description |
---|---|---|---|
status | string | Yes | Set it to read. |
notificationId | string | Yes | Set it to the ID of the notification that must be marked as acknowledged. |
Multiple notificationId values can be acknowledged using one COAPI call by including them in a single request.
- Request Sample
-
curl --location --request PUT 'https://api-test.sovos.com/v1/notifications/IT' \ --header 'Content-Type: application/json' \ --header 'x-correlationId: developer-guide' \ --data-raw '[ { "status": "read", "notificationId": "51341d39-...-a73d73e0de76" } ]'
- Response Sample
-
{ "timestamp": 1601673284, "status": 200, "success": true, "message": "Notifications acknowledged successfully." }
Archiving
It's possible to compliantly archive the XML, the application response, and any graphical representation (i.e., PDF) using Sovos' Compliant Archive. However, this will not be done automatically as part of the clearance process. Instead, customers need to perform their own archiving using our Archiving resource (see also our eArchiving integration guide).
Error Handling
Customers need to adhere to the error handling principles outlined on the responses page.
In general, all error codes in the 400 range are client errors, so the customer needs to analyze them. After fixing the error, it's possible to resend the request. Error codes 408 and 429 are exceptions: in these cases, customers should wait at least 60 seconds before retrying. The error codes in the 500 range are server errors. In that case, customers need to resend the request, according to the instructions given on the responses page, which also includes a full list of error codes the COAPI can return. This government web page contains documentation about the API that includes all the error codes and messages that can be returned, and can be used for error handling.