Document Upload APIs
Send invoices and credit notes in formats other than Peppol BIS, and download them in those formats
Upload an outgoing invoice or credit note in another format
Send an invoice or credit note in a format other than Peppol BIS. Qvalia converts it to Peppol BIS Billing 3.0, and from there it is handled exactly like a POST to /invoices/outgoing or /creditnotes/outgoing: the same validation, the same duplicate check (409, or overwrite=true to send it again) and the same delivery_method.
Qvalia stores the converted Peppol document. The format you uploaded is remembered, so GET /transaction/{accountRegNo}/document/download gives the document back in that format. Svefaktura 1.0 and EDIFACT are the exceptions, downloaded as Peppol BIS by default: Svefaktura 1.0 can be uploaded but not produced, and EDIFACT is only produced as INVOIC D.96A (EANCOM 1997), which may not be the version you uploaded. Ask for format=edifact to get the D.96A.
Need another format? We add formats on request: another e-invoice standard, another EDIFACT subset or trading partner guide, a national format, or a customer's or ERP system's own format. Contact help@qvalia.com with a few sample documents.
format
What to send
svefaktura1
Svefaktura 1.0 XML
xrechnung
XRechnung, in either UBL or CII syntax
cii
UN/CEFACT Cross Industry Invoice (EN 16931) XML
zugferd, facturx
The CII XML of a ZUGFeRD or Factur-X invoice. The PDF itself is not accepted: send the XML embedded in it.
edifact
A UN/EDIFACT INVOIC message: an invoice, or a credit note (BGM 381, 383 or 396). Directory versions D.93A to D.16B are accepted, including EANCOM 1997 (D.96A) and EANCOM 2002 (D.01B). Send one message per upload, UTF-8 encoded, as application/edifact or text/plain.
cxml
A cXML InvoiceDetailRequest, as SAP Ariba and Coupa use it: an invoice, or a credit memo (purpose="creditMemo" or "lineLevelCreditMemo"), as application/xml. cXML carries no Peppol participant ids, so give them with receivingPeppolId / sendingPeppolId unless the document has them, and an invoice without a purchase order needs buyerReference.
finvoice3
Finvoice 3.0 (Finland): an invoice or a credit note, as application/xml.
A document that cannot be converted, or that is not valid Peppol BIS once converted, is answered with 422 and the reason.
sendingPeppolId and receivingPeppolId set the sender's and receiver's Peppol participant IDs, whatever the document says. Use them for a format with no Peppol address (Svefaktura, often EDIFACT), or to send to another participant than the one in the document. For a CII document, the kept original gets the same IDs, so the original CII is no longer byte for byte what was uploaded.
For EDIFACT, give each party an identifier with its scheme, because Peppol routes on it. A GLN (NAD+BY+7300000000000::9) becomes scheme 0088. Another scheme can be given as its ISO 6523 code in the code list qualifier, for example NAD+BY+5599000295:0007 for a Swedish organisation number. Without one, a Swedish, Norwegian or Danish party's organisation number is read from its VAT number (RFF+VA). Totals, the VAT breakdown and line amounts that the message leaves out are calculated by the EN 16931 rules.
If you upload XML without an Accept header, the response is XML, as for any XML POST. Send Accept: application/json to get the JSON response instead.
Account registration number issued by Qvalia
""The kind of document you upload.
The format of the document you upload. See the endpoint description for what each one takes.
How the document reaches the receiver. Leave it out to send over Peppol.
Taken only on POST /invoices/outgoing, POST /creditnotes/outgoing and POST /document/upload.
Any other endpoint (an incoming document, an order, …) answers 400 when it is given.
Delivery methods must be added to your account before you can use them, except for peppol, which
is the default and always enabled. Using a method outside your agreement results in a
403 Forbidden error naming the refused delivery method. Contact your Qvalia sales representative,
or Qvalia sales, to add delivery methods to your agreement.
peppol: over the Peppol network. The receiver must be registered in Peppol.email: needs the buyer's e-mail address inAccountingCustomerParty > Party > Contact > ElectronicMail.postal: printed and posted. Needs the buyer's name and a complete postal address inAccountingCustomerParty > Party > PostalAddress.internetbank,kivra,billo,minameddelanden: to a consumer. Needs a Swedish personal number ([YY]YYMMDD[-]nnnn) or an FMI address ([YY]YYMMDDnnnn.<BANK>.SE) inAccountingCustomerParty > Party > PartyIdentification.edi: over EDI, as agreed with Qvalia for your account.finvoice: as Finvoice (3.0, or 2 if your account is set up for it), over the Finnish e-invoicing network through Qvalia's Finnish operator partner. Needs the buyer's Finnish business ID or OVT code.dynamic_routing: Qvalia chooses the channel for each receiver, from your account's set-up and how the receiver can be reached: Peppol, a digital mailbox or internet bank, e-mail or print.
A document missing what its delivery method needs is answered with 422.
Whatever the delivery method, the document is validated as Peppol BIS Billing 3.0. Only
peppol, or no delivery_method, also checks that the receiver is registered in Peppol,
so you can send to a receiver outside Peppol with any other method.
Accepted on outgoing invoices and credit notes.
peppolPossible values: For POST requests, chose to overwrite upon a 409 Conflict response to reprocess the message with the same document ID and receiver (i.e. send the same message again)
falseExample: falseConvert and validate the document without storing or sending it. The response is the
Peppol validation result: 200 when the converted document is valid, 422 when it is not.
falseExample: falseThe sender's Peppol participant ID, <scheme>:<identifier>. It replaces the seller's
electronic address in the document (BT-34, cbc:EndpointID in the converted Peppol
document, and the seller's ram:URIID in a CII original). Use it when the uploaded
format has no Peppol address, or a different one.
0007:5560004755Pattern: ^[0-9]{4}:[a-zA-Z0-9._-]{4,}$The receiver's Peppol participant ID, <scheme>:<identifier>. It replaces the buyer's
electronic address in the document (BT-49), which is where the document is sent over
Peppol. The receiver must be registered on Peppol for the document type, as for any
outgoing document.
0007:5599000295Pattern: ^[0-9]{4}:[a-zA-Z0-9._-]{4,}$The buyer reference (BT-10) for a cxml upload. A cXML invoice without a purchase order carries none,
and Peppol BIS then requires one.
PROJ-4711Optional. Send a unique value you generate per submission (a UUID is recommended!)
and a repeat of the same request returns the original response, with the original
integrationId, instead of creating a second document.
This is what makes a submission safe to retry after a timeout: if the connection
breaks after we accept the POST but before the response reaches you, repeating it
with the same key tells you whether the document was created, without a
reconciling GET.
- Same key, same body, request finished: the original response is replayed.
- Same key, same body, original still in flight:
409. - Same key, different body:
400. - Key older than 24 hours: treated as new.
A request that fails releases its key, so you can retry the same key after an error. Keys are scoped to your account.
b7f3a1c2-9d4e-4f5a-8b6c-1d2e3f4a5b6cPattern: ^[\w.:@+-]+$OK
successBad Request
Unauthorized. Returned when the API key or Bearer token is missing, malformed or not valid for the account in the URI.
Forbidden. The credentials are valid, but the account is not permitted to perform this action — typically because the required integration feature or scope is not enabled on the account.
Conflict
Unprocessable Entity
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
Internal Server Error. metadata is deliberately omitted on a 500 — no
internal detail is returned. Try again; if the problem persists contact
help@qvalia.com.
POST /transaction/{accountRegNo}/document/upload?type=invoice&format=svefaktura1 HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 183
"<?xml version="1.0" encoding="UTF-8"?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100">
...
</rsm:CrossIndustryInvoice>"{
"status": "success",
"data": {
"message": "Invoice 100-1000 sent",
"integrationId": "4725a033-e501-4e2f-afa5-3a5c24eb5e28",
"ANY_ADDITIONAL_PROPERTY": "100-1000"
}
}Download an outgoing invoice or credit note in another format
Get one of your outgoing invoices or credit notes in the format you choose. Qvalia stores every document as Peppol BIS and converts it when you download it.
Without format, you get the document back in the format it was uploaded in through POST /transaction/{accountRegNo}/document/upload (except Svefaktura 1.0 and EDIFACT, which come back as Peppol BIS). A document that was sent as CII comes back as the original CII. A document that was sent as Peppol comes back as Peppol BIS XML.
The response is the document itself, without the usual status/data envelope:
The XML formats are returned as XML (
application/xml).edifactis returned as an EDIFACT interchange (application/edifact, UTF-8).zugferdandfacturxare PDFs. They are returned as JSON (application/json):{ "filename", "mimeType", "content" }, with the PDF base64-encoded incontent.
The document must meet the chosen format's own rules. For example, XRechnung needs a Leitweg-ID (BT-10, BuyerReference). If it does not, the answer is 422 with what is missing.
Downloading does not mark the document as read.
Need another format? We add formats on request. Contact help@qvalia.com.
Account registration number issued by Qvalia
""The kind of document to download.
The document's integrationId, as returned when it was sent (or uploaded). Only your
own outgoing documents can be downloaded. Any other id is answered with 404.
4725a033-e501-4e2f-afa5-3a5c24eb5e28The format to download the document in. Leave it out to get the format it was uploaded in, or Peppol BIS XML for a document that was sent as Peppol.
format | You get |
|---|---|
peppol | Peppol BIS Billing 3.0 UBL XML, as Qvalia stores it |
xrechnung | XRechnung, UBL syntax |
xrechnungcii | XRechnung, CII syntax |
cii | UN/CEFACT Cross Industry Invoice (EN 16931) XML. For a document sent as CII, the original as it was sent. |
zugferd, facturx | A ZUGFeRD / Factur-X PDF/A-3 with the CII XML embedded, as JSON (see the response) |
finvoice2 | Finvoice 2 XML. Invoices only: a credit note is answered with 400. |
finvoice3 | Finvoice 3.0 XML, an invoice or a credit note. |
cxml | A cXML InvoiceDetailRequest; a credit note as a credit memo (purpose="creditMemo"). |
edifact | A UN/EDIFACT INVOIC D.96A, EANCOM 1997 (EAN008) interchange: one message, UTF-8 (UNOC). A credit note has BGM 381. |
The document in the requested format, without the usual response envelope. The XML formats
are returned as XML, edifact as EDIFACT; zugferd and facturx as JSON carrying the PDF.
The document, e.g. an XRechnung or Finvoice XML.
Bad Request
Unauthorized. Returned when the API key or Bearer token is missing, malformed or not valid for the account in the URI.
Forbidden. The credentials are valid, but the account is not permitted to perform this action — typically because the required integration feature or scope is not enabled on the account.
Not Found
Unprocessable Entity
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
Internal Server Error. metadata is deliberately omitted on a 500 — no
internal detail is returned. Try again; if the problem persists contact
help@qvalia.com.
GET /transaction/{accountRegNo}/document/download?type=invoice&integrationId=4725a033-e501-4e2f-afa5-3a5c24eb5e28 HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
...
</ubl:Invoice>Last updated
Was this helpful?

