API do konwersji faktur
POST /v1/invoices/convert?target=… konwertuje między UBL a CII, na Peppol BIS Billing 3.0, na PDF/A-3 ZUGFeRD / Factur-X (profile EN 16931, EXTENDED i XRECHNUNG), na Facturae 3.2.2 i KSeF FA(3) oraz z Facturae i KSeF na EN 16931.
Każdy skonwertowany dokument jest walidowany według reguł formatu docelowego, zanim zostanie zwrócony. Jeśli format docelowy nie może przenieść części danych, wywołanie kończy się błędem semantic_loss z listą pojęć biznesowych; wykonuje się tylko wtedy, gdy przekażesz allowDataLoss=true. Dane, których potrzebuje format docelowy, a których brakuje w źródle, są wymagane od Ciebie (target_data_required), nigdy wymyślane.
curl https://einvoiceengine.com/v1/invoices/parse \ -H "Authorization: Bearer $EINV_KEY" \ -H "Content-Type: application/xml" \ --data-binary @invoice.xml
Obsługiwane tutaj
| Format | Wersje | Kontrole |
|---|---|---|
| XRechnung 3.0 (UBL 2.1 Invoice / CreditNote) obsługiwane | 3.0.2 | XML well-formedness, UBL 2.1 XML Schema, EN 16931 Schematron (CEN, UBL binding), XRechnung 3.0.2 CIUS Schematron (KoSIT) |
| XRechnung 3.0 (UN/CEFACT CII D16B) obsługiwane | 3.0.2 | XML well-formedness, CII D16B XML Schema, EN 16931 Schematron (CEN, CII binding), XRechnung 3.0.2 CIUS Schematron (KoSIT) |
| EN 16931 core (UBL 2.1) obsługiwane | EN 16931-1:2017 (CEN artefacts 1.3.16) | XML well-formedness, UBL 2.1 XML Schema, EN 16931 Schematron (CEN, UBL binding) |
| EN 16931 core (UN/CEFACT CII D16B) — also Factur-X / ZUGFeRD 'EN 16931' profile XML obsługiwane | EN 16931-1:2017 (CEN artefacts 1.3.16) | XML well-formedness, CII D16B XML Schema, EN 16931 Schematron (CEN, CII binding) |
| ZUGFeRD 2.x / Factur-X 1.0 (PDF/A-3 with embedded CII XML, or the CII XML alone) obsługiwane | Profile MINIMUM; Profile BASIC WL; Profile BASIC; Profile EN 16931 (COMFORT); Profile EXTENDED; Profile XRECHNUNG | Extraction of the embedded XML (factur-x.xml, zugferd-invoice.xml, xrechnung.xml), Factur-X 1.09.2 / ZUGFeRD 2.5 XML Schema of the profile (FNFE-MPE / FeRD), Factur-X 1.09.2 / ZUGFeRD 2.5 Schematron of the profile, including the EN 16931 rules for BASIC, EN 16931 and EXTENDED, Profile XRECHNUNG: XRechnung 3.0.2 CIUS (see XRechnung CII), PDF/A-3 conformance of the PDF container (veraPDF), when the PDF checker is enabled |
| Peppol BIS Billing 3.0 (UBL 2.1 Invoice / CreditNote) obsługiwane | 3.0.21 (May 2026 rules) | XML well-formedness, UBL 2.1 XML Schema, EN 16931 Schematron (CEN, UBL binding, as packaged by OpenPeppol), Peppol BIS Billing 3.0.21 Schematron (OpenPeppol) |
| Facturae 3.2 / 3.2.1 / 3.2.2 (Spain) obsługiwane | 3.2.2; 3.2.1; 3.2 | XML well-formedness, Facturae XML Schema of the version (Ministerio de Hacienda), Calculation rules defined in the official schema documentation (line totals, invoice totals, batch totals): FAC-R01..R11, FAC-B01..B05, XAdES signature: presence (FAC-S01, warning), cryptographic integrity of every signed reference and the signature value, coverage of the whole document (FAC-S02, FAC-S03), certificate validity period at signing time (FAC-S04), Signing certificate trust (hosted API): issued under a qualified certification service (CA/QC) granted on the Spanish trusted list at signing time, reached through the signature-verified EU List of Trusted Lists (FAC-SIG-TRUST); not revoked at signing time, by OCSP with CRL fallback (FAC-SIG-REVOKED); unavailable lists or revocation services give a warning (FAC-SIG-TRUST-UNKNOWN) |
| KSeF FA(3) structured invoice (Poland) obsługiwane | FA(3) 1-0E (mandatory since 2026-02-01) | XML well-formedness, FA(3) XML Schema (Ministerstwo Finansów), the same check KSeF applies on submission |
Pełna lista: obsługiwane formaty i ograniczenia.
Pytania
Jak testowana jest konwersja?
Na oficjalnym zestawie testów XRechnung 3.0.2 w obu kierunkach: 79 z 86 przypadków konwertuje się bez utraty danych, a pozostałe 7 jest odrzucanych z podaniem przyczyny. Dokumentacja konwersji podaje aktualne wyniki dla pozostałych formatów.
Czy można konwertować pliki ZUGFeRD MINIMUM lub BASIC WL?
Nie. Te profile nie zawierają pozycji faktury i nie są konwertowane.
Czy skonwertowany plik jest przechowywany?
Zależy to od ustawienia przechowywania w Twojej organizacji, a parametr store nadpisuje je dla pojedynczego wywołania. Przechowywane dokumenty są szyfrowane i trzymane przez ustawiony przez Ciebie okres przechowywania.
E-Invoicing API