Overview
If you already have UBL (Universal Business Language) XML files, you can send them directly via e-invoice.be without converting from JSON. This is useful when:- You have an ERP system that generates UBL XML
- You’re migrating from another Peppol Access Point
- You have existing UBL files to send
- You want full control over the UBL structure
Prerequisites
Your UBL XML must:- Be valid UBL BIS Billing 3.0 format
- Comply with Peppol specifications
- Be either an Invoice or Credit Note
Use the
/api/validate/ubl endpoint to validate your UBL XML before creating documents.Workflow
- Validate your UBL XML (recommended)
- Create document from UBL
- Send via Peppol
Step 1: Validate UBL XML
Before creating a document, validate your UBL file. Both/api/validate/ubl and /api/documents/ubl accept multipart/form-data with a file field — not a raw XML body.
Validation Response
Valid UBL:Step 2: Create Document from UBL
Once validation passes, create the document. Same contract:multipart/form-data with a file field.
Response
Step 3: Send via Peppol
Send the document using the document ID:Response
Peppol ID Routing
By default, sender and receiver Peppol IDs are automatically derived from the company identifiers in your document, regardless of any endpoint IDs specified in the UBL XML:- Derived from company tax IDs (
vendor_tax_id/customer_tax_id) OR company IDs (vendor_id/customer_id) - For Belgian companies:
0208scheme is always used (Belgian government requirement) - Example: Tax ID
BE1018265814→ Peppol ID0208:1018265814
UBL Endpoint IDs are ignored: Even if your UBL document contains specific endpoint IDs (e.g.,
<cbc:EndpointID schemeID="0088">1234567890123</cbc:EndpointID>), these are not used for routing. The API derives Peppol IDs from the company identifiers in the document metadata instead.Explicitly Specifying Peppol IDs (Recommended)
To route to a specific Peppol endpoint, explicitly provide the Peppol IDs via query parameters:
Common Peppol schemes:
0208- Belgian enterprise number (BE)0088- Global Location Number (GLN)0106- Dutch KVK
Example UBL Invoice
Here’s a minimal valid UBL invoice:Code Examples
Node.js
Python
Retrieving UBL from Created Documents
If you created a document via JSON and want to retrieve the generated UBL:Common UBL Validation Errors
Missing Peppol Profile
Error:Invalid Customization ID
Error:Missing Endpoint ID
Error:Invalid Tax Category
Error:Best Practices
Always Validate Before Creating
Always Validate Before Creating
Use
/api/validate/ubl to catch errors early. Both endpoints take multipart/form-data with a file field — use -F (curl) / files= (requests) / FormData (axios), not raw XML bodies.Use Correct Namespaces
Use Correct Namespaces
Ensure all UBL namespaces are correctly declared:
Verify Peppol IDs
Verify Peppol IDs
Before sending, verify customer Peppol IDs:
Handle Large Files Efficiently
Handle Large Files Efficiently
For large UBL files:
- Use streaming when reading files
- Consider compressing before transmission
- Check file size limits in your HTTP client
Store Original UBL
Store Original UBL
Keep a copy of the original UBL for audit purposes:
UBL Credit Notes
Credit notes follow the same process but use the CreditNote element:Resources
Next Steps
Creating from PDF
Learn how to create documents from PDF files
Creating Invoices
Create invoices from JSON
Validation Guide
Test invoice data
API Reference
Explore all endpoints