With an ERP — API integration
Your ERP stays in the lead for posting and master data. CoolHanX takes over the part that is expensive on the ERP side: formatting, validation, delivery, archive.
The division of labor
Building EN 16931 formatting, BR-DE validation, Leitweg-ID handling, a GoBD archive and delivery channels into an existing ERP is a project with six-figure potential — and ongoing maintenance with every change to the standard. The alternative: your ERP delivers the invoice data just as it already holds it, and CoolHanX handles the e-invoicing part as a service.
Posting, payment runs, dunning, reporting: unchanged in your ERP. All that changes is the last mile to the recipient — and that gets validated, archived and logged.
| Endpoint | Purpose | Properties |
|---|---|---|
| POST /v1/erp/invoices | Issue an invoice from ERP data | EN 16931 gate, idempotent per document number, VALID/error as response |
| POST /api/erp/onboarding/ingest | Submit raw data in YOUR format | Field mapping server-side — no rebuild needed in the ERP |
| GET /v1/erp/invoices/{nr} | Query status & delivery | incl. transmission history |
| GET /v1/erp/inbound | Fetch inbound documents automatically | validated, with error status |
| API keys | Sandbox & production, permissions per key | issue/receive scopes, rotation, audit |
Onboarding in three steps
- 1 · Keys & sandboxYou receive test and production keys with separate permissions (issue only, fetch only, both).
- 2 · Field mapping instead of programmingYour export format (CSV, IDoc-like, JSON) is mapped server-side onto the invoice model — including line items. A dry run shows the result before anything is issued.
- 3 · Test document → release → liveA sandbox document runs through the real validation; if everything fits, you enable the production key. The integration status (keys, mapping, first documents) is available at any time.
Reliability in continuous operation
- Idempotency: the same document number sent twice → one document, no duplicate. Retries after timeouts are safe.
- Honest errors: an invalid document comes back as an error with the concrete rule violations — never as a silent “it’ll be fine.”
- Tenant separation & segments: ERP keys work only for ERP tenants; web accounts have no API access and vice versa.
- Full archive: API documents too are stored unalterably for 8 years in the GoBD archive — your ERP doesn’t have to do that itself.
| Situation | Response | Your ERP does |
|---|---|---|
| Document valid | 200 · status VALID + number | Save status, done |
| Same document number again | 200 · idempotent:true | nothing — no duplicate created |
| Validation error | 422 · concrete rule violations (e.g. BR-DE-15) | Show error, correct data |
| Key without permission | 403 | Check configuration |
| Web account instead of ERP tenant | 403/404 — segments are separate | Use the correct tenant |
Security of the machine interface
API keys are stored hashed (plaintext visible only once at creation), carry permissions (issue only, fetch only) and environments (sandbox/production) and can be rotated at any time. Every call is assigned to a tenant and logged; the web interface and the machine API are strictly separate access paths.
Example call
POST /v1/erp/invoices · Authorization: Bearer <API-Key>{"number":"RE-2026-1042","buyer":{"name":"Kunde GmbH","country":"DE","vat_id":"DE…"},"lines":[{"name":"Seefracht","net_price":2500,"service_type":"intl_transport"}]}
Response: {"status":"VALID","number":"RE-2026-1042", …} — or the precise validation errors.
Frequently asked questions
Which ERP systems are supported?
All that can export invoice data — the mapping does the format work. The reference case is a logistics integration (Cello / IDoc-like structures).
What does the integration cost?
A quote based on document volume and connection effort — support@coolhanx.com.
How long does the connection take?
With an existing data export, typically days, not months: configure the mapping, sandbox document, release.
Are there webhooks?
Status queries are available; push webhooks for delivery events are planned for production.
How do we test safely?
With the sandbox key: same validation, separate data space, no impact on production — including a dry run of the field mapping.
Who maintains the mapping when formats change?
The mapping sits server-side and is adjusted jointly — your ERP export stays unchanged.
Do you support multiple tenants/companies?
Yes — one tenant per company with its own keys, number ranges and its own archive.
How the connection works technically
Your system talks to a lean REST API with API-key authentication: it delivers the invoice data as JSON (header, partners, line items, tax and payment details), CoolHanX builds the EN 16931-compliant XRechnung from it, checks it against BR-DE, assigns the gapless number, archives it GoBD-compliant and reports the status back. Issuing is idempotent: a repeated call with the same reference does not create a duplicate invoice.
From the ERP record to the validated e-invoice
- 1 · Set up the mappingYour field names are mapped once onto the EN 16931 BT — during onboarding with a test run (sandbox) before anything goes live.
- 2 · Send dataYour ERP calls the API with the invoice record.
- 3 · Validate & issueCoolHanX validates, numbers, archives — or returns concrete BR-DE codes on errors, without consuming a number.
- 4 · Status backThe result (VALID/error), the invoice number and the archive reference go back to your system.
| Task | Your ERP | CoolHanX |
|---|---|---|
| Master data, posting, payment runs | ✓ | — |
| EN 16931 formatting | — | ✓ |
| BR-DE validation | — | ✓ |
| Gapless numbering + GoBD archive | — | ✓ |
| Delivery (email/portal) | — | ✓ |
| Reporting/dunning | ✓ | — |
Onboarding, sandbox and pricing
For ERP customers there is a sandbox for safely testing the mapping and the issuing before going live. The offer depends on document volume and connection effort — talk to us, we’ll put together a suitable quote rather than a flat-rate plan.
Related topics
Which ERP systems and formats we connect
We connect anything that can export invoice data — our server-side mapping does the format work. Proven paths:
| System / format | How | Reference |
|---|---|---|
| SAP (IDoc / RFC export) | structured export → mapping | Logistics reference (Cello) |
| DATEV | posting/document data → EN 16931 | Tax-firm environment |
| EDIFACT / EDI | INVOIC segments → XRechnung | Trade & forwarding |
| Microsoft Dynamics · Sage · Lexware | CSV/XML export → mapping | common SME ERP |
| Your own system / CSV / JSON | REST API with JSON or CSV export | individual |
Connectable from any programming language
The interface is a lean REST API with an API key — connectable from Python, PHP, Java, C#, Node.js or directly via curl. You send the invoice data as JSON; CoolHanX builds, validates, numbers, archives and reports the status back. No forced SDK, no proprietary library.
curl -X POST https://…/v1/erp/invoices -H 'Authorization: Bearer <API-Key>' -H 'Content-Type: application/json' -d '{…}'
| Target | What CoolHanX handles |
|---|---|
| Your customers (B2B) | create, validate and deliver the e-invoice by email/Peppol |
| Public sector (B2G) | Leitweg-ID, ZRE/OZG-RE portal export |
| Peppol network | Delivery via a certified access point (add-on) |
| Tax-office conformity | EN 16931 / BR-DE validation (KoSIT) |
| Tax advisor / DATEV | EXTF posting batch, read-only firm access |
| GoBD archive | audit-proof retention for 8 years |
We’ll get back to you within 24 h on business days. Alternatively: support@coolhanx.com
Allgemeine Produktinformation — keine Rechts- oder Steuerberatung. Verbindliche Auskünfte gibt Ihr Steuerberater bzw. Ihre Rechtsberatung.
Discuss an ERP connection? Send the request above or support@coolhanx.com — reply within 24 h on business days.
Create your free company account