Receive invoices
Receive invoices through PEPPOL or by email, retrieve the application responses, download the documents, and acknowledge the responses.
Before you begin
Make sure that:
-
You completed Set up account and Set up credentials.
-
To receive invoices through Pan-European Public Procurement On-Line (PEPPOL), you created your inbound endpoint. See Configure network.
-
To receive invoices by email, you have the dedicated inbound email address that Sovos sets up for your company.
How receiving works
You can receive invoices through PEPPOL or by email. After Sovos receives the invoice through either channel, the processing and the notifications are the same.
Sovos is your Access Point (AP) in the PEPPOL network when a supplier's AP sends you an invoice. After receiving the invoice, Sovos does the following:
-
Sovos validates the document against semantic, syntactic, and legal rules.
-
Sovos sends a status response to the supplier's AP.
-
If the supplier doesn't use the format you configured for your ERP system ID, Sovos maps the document to your format.
-
Sovos generates an application response that includes the document.
Receive an invoice by email
When you receive an invoice by email as a buyer:
-
The supplier sends the invoice to your mailbox.
-
You forward the invoice to the Sovos mailbox for your tax ID.
From there, the flow is the same as for PEPPOL. Sovos maps the document, validates it against schema and Schematron rules, and generates the PDF. Then Sovos creates the application responses, starting with 215, which means that the document is available to you. After that, you can retrieve, download, and acknowledge the responses, as described in the following sections.
Inbound error handling for email follows the PEPPOL inbound behavior. If Sovos already processed the same document, it silently ignores the duplicate.
Retrieve application responses
You can access your attachments:
-
As open download links, in which the response contains a public URL to download the file.
-
As secure download links, in which you need to use the Indirect Tax API's bearer token to download the attachment.
By default, Sovos configures your attachments as open download links to avoid potential size limitations when retrieving responses. To improve security, you should configure them as secure links. Then, make a GET call to the secure link returned by the Indirect Tax API, and include the API token. Sample request:
curl --location 'https://einvoicing-api.sovos.com/download/api/v1/download/JqYyqliXiJFKhXshnBQZfW3qpfwATVGE5Q73T41JUynNLJD8zHy5VH__9qzL9No-Kia9olSw3_lNX3KmaA9Je89Xx--vk5pQjyKx0iT_4CwPSABD0Yg7uxXZ8SNiliEhFY-4TOX7m1TV5FwwfqntehbGaiGMI2JVYu18VBDiC_0/plain%27 \
--header 'Authorization: Bearer TOKEN'
You must retrieve the application responses for an invoice until you get the final one. If you subscribed to all notifications, one invoice can generate several application responses.
| SCICloudStatusCode | SCIResponseCode | StatusReason | Action |
|---|---|---|---|
| 215 | AP | Made available | The document is available to you. Decode the application response, download the document, and acknowledge the application response. This status is final. |
To retrieve the application responses for an invoice you received, you must send a GET request to the /v1/notifications/DE endpoint.
Decode the application response
You must decode the Base64-encoded content field from the application response to get the XML, which includes the download links for the document.
The decoded ApplicationResponse includes one DocumentReference element for each available file. The link is in Attachment/ExternalReference/URI, and the schemeID attribute of that element identifies the format:
| schemeID | Use | MIME type |
|---|---|---|
| Integration | The invoice in the format Sovos maps to for your ERP system. Use it to process the invoice in your system. | application/xml |
| Legal | The invoice in the format the supplier sent. Use it for archiving. | application/xml |
| A readable version of the invoice. Use it for review. | application/pdf |
The available files depend on your attachment configuration, so use the links that appear in the response. See an application response sample.
Download the document
Send a GET request to the link in the URI element of the format you need. This applies to documents that you receive through PEPPOL and by email. You can also see the received document and its attachments in the Network Services portal.
Download links expire according to the notification availability rules. Download the files soon after you retrieve the application responses.
Acknowledge application responses
To process each application response you retrieve and mark it as acknowledged, make a PUT request to the /v1/notifications/DE endpoint.
You can acknowledge multiple notificationId values in a single Indirect Tax API request.
