Skip to main content

Supplier invoices by e-mail or upload

Not every supplier sends over Peppol. Many German suppliers e-mail an XRechnung, or a ZUGFeRD PDF, and many supplier portals let you download a Factur-X. GoRoute takes those in too, by upload in the portal or through the API, or by e-mail to an address of your own, and puts them in the same place as the invoices that arrive over Peppol. From there nothing is different: your accounting connector picks them up, or the Sage 50 agent writes them into its import file with the supplier's own PDF beside it.

Check that your service takes them

Not every GoRoute service has this yet. In the portal, open Purchase invoices (AP): if there is an Upload supplier invoice button, your service takes uploads. If there is not, it does not yet, and nothing on this page applies to you. Through the API, the upload call below answers 405 Method Not Allowed on a service that does not take uploads, with or without a key. A service that takes uploads never answers that call with 405. If you are not sure, ask support.

What is acceptedโ€‹

What the supplier sendsWhat GoRoute reads
XRechnung in UBL (.xml)the invoice itself
XRechnung in CII (.xml, rsm:CrossIndustryInvoice)the invoice itself
Peppol BIS Billing 3.0, or any EN 16931 UBL or CII invoice or credit notethe invoice itself
ZUGFeRD 2.x or Factur-X (a PDF with the invoice XML embedded)the embedded XML (factur-x.xml, zugferd-invoice.xml, xrechnung.xml); the PDF is kept as the supplier's own copy

A file with no e-invoice in it (a scanned PDF, a Word file, a plain PDF invoice) is not accepted: GoRoute does not read invoices from images or free text, so nothing is guessed. Ask the supplier for the e-invoice, or enter that one by hand. The limit is 20 MB a file.

Every file is read the same way whichever route it came by, into the same normalised invoice an ERP connector reads for a Peppol invoice: supplier name, VAT number and electronic address, invoice number and dates, currency, lines, and the VAT breakdown by category and rate.

Uploadโ€‹

In the portal, Purchase invoices (AP) โ€บ Upload supplier invoice, then choose or drop the file. You see at once whether it was received, and anything that needs a look (for example, an invoice addressed to another company).

Through the API, with a key that may create invoices (the write scope):

POST /api/v1/inbound-documents/upload

The body is a multipart form: file, the one invoice file, and optionally note, up to 500 characters, which is kept with the document's evidence.

curl -X POST https://app.goroute.ai/peppol-api/api/v1/inbound-documents/upload \
-H "X-API-Key: $GOROUTE_API_KEY" \
-F "file=@rechnung-4711.xml" \
-F "note=downloaded from the supplier portal"

The answer is the received document, as GET /api/v1/inbound-documents/{id} gives it, plus created:

StatusMeaning
201Received, a new document (created: true).
200This exact file was received before (by upload or e-mail); the existing document is returned (created: false). Nothing is added twice.
422Not an e-invoice (error_code NOT_AN_INVOICE or EMPTY_FILE). Nothing is stored.
413Larger than 20 MB (FILE_TOO_LARGE).

Now and then the answer is shorter: only transaction_id, created and status: null. The file was received, but its received-document record has not been made yet. GoRoute makes it a moment later, when it hands the document on. It then appears in GET /api/v1/inbound-documents, and the same file uploaded again answers it with 200.

E-mailโ€‹

Company settings โ€บ Supplier invoices shows your organisation's address, or a Create address button if it has none yet. The address has this shape:

<yourcompany>-<16 letters and digits>@<the intake domain Company settings shows>

The first part is your organisation's short name; the 16 characters after it are what make the address impossible to guess. Give it to suppliers who e-mail their e-invoices, or forward such an e-mail to it.

  • Every invoice file attached to the e-mail becomes one received document. Signatures, logos and the e-mail text are ignored.
  • The same file sent twice, or e-mailed after you uploaded it, is recorded once.
  • An e-mail with no e-invoice attached is set aside. No reply is ever sent to the sender.
  • Replace address gives you a new address; the old one stops working at once. Use it if the address reaches people who should not have it. Only an administrator of your organisation can replace it.
  • Put the address in To or Cc. A message that reached it only as a Bcc may not be matched to your organisation.
Availability

Receiving by e-mail is switched on per service, separately from the upload. If Company settings says Not available yet, or has no Supplier invoices tab, use the upload; everything else on this page applies.

Through the API, the same address is read and replaced with two calls:

GET  /api/v1/inbound-documents/email-address
POST /api/v1/inbound-documents/email-address

GET needs a key with the read or write scope. It answers configured, which is false where receiving by e-mail is not set up; address, your address, or null if none has been made yet or e-mail is not set up; created_at, when the address was made; and accepts, a sentence naming the files it takes.

POST makes the address, or replaces it, and answers the same fields. It needs the settings:manage permission: a key with the admin scope, or a signed-in person who may manage your company settings. Where receiving by e-mail is not set up, it answers 409 with error_code INTAKE_EMAIL_NOT_CONFIGURED, and nothing changes.

How to tell them apartโ€‹

Every received document records how it arrived. In the portal, filter Purchase invoices (AP) by channel: Uploaded or Received by e-mail. Through the API, GET /api/v1/transactions takes delivery_channel=intake_upload or delivery_channel=intake_email, and the document's evidence names the channel, the file name and who brought it (the uploader, or the e-mail's sender, subject and Message-ID).

GET /api/v1/inbound-documents/{id}/files/{kind} answers:

kindFor an uploaded or e-mailed document
originalthe file exactly as received: the XML, or the ZUGFeRD / Factur-X PDF
xmlthe invoice XML (inside the PDF, for a ZUGFeRD or Factur-X)
pdfthe supplier's own PDF when there is one, otherwise a PDF GoRoute renders from the invoice

Checks that never blockโ€‹

GoRoute compares the invoice's buyer with your organisation's VAT number and Peppol ID. An invoice addressed to someone else is still received, and carries the exception intake_buyer_mismatch so a person decides what to do with it. A document the format allows but the normalised invoice cannot hold completely is kept too, with its parse_error, so it stays findable.

These invoices did not travel over Peppol: no Peppol message-level response is sent for them, and they are not counted in GoRoute's Peppol network statistics.