REST API
Every invoice operation CrateAPI does, grouped by what you're doing — Generate, Validate, Convert & Render, Extract & Embed — not by which format it happens to be in.
Two things worth knowing up front: validation is free — no credit card, no account — and extraction is deterministic — it reads the XML that's actually embedded in a PDF, it doesn't reconstruct or guess one.
Try it live
Pick an operation, paste or load a sample, and call the real API — right here, no signup.
JSON invoice in, compliant XML — or a Factur-X PDF — out. Every output is pre-validated before it ever reaches you.
This is the developer path — for a guided form, use the no-code generator on the homepage.
Generate
JSON invoice in, compliant XML — or a Factur-X PDF — out. Every output is pre-validated before it ever reaches you.
POST /v1/generate/ublPre-validated UBL 2.1 invoice XML — pick Peppol BIS, XRechnung or RO_CIUS with ?profile=. If it doesn't pass the official rules, you get an error instead of a bad invoice.
POST /v1/generate/ciiThe same guarantee, in CII D16B — the syntax inside Factur-X and ZUGFeRD.
POST /v1/generate/facturxA complete Factur-X PDF: our clean visual layout, with the compliant EN 16931 CII XML embedded inside.
POST /v1/generate/fatturapaPOST /v1/generate/facturaePOST /v1/generate/ksefItaly's FatturaPA, Spain's Facturae and Poland's FA_VAT/KSeF — three proprietary national XML vocabularies, one JSON invoice model in.
Validate
The exact rule sets behind every generate call, exposed as their own product. It's also the one thing on this page that's free.
Free, no key, right now:
curl -X POST https://api.crateapi.com/v1/validate/ubl \ -H "Content-Type: application/xml" \ --data-binary @invoice.xml {"profile":"peppol","valid":true,"counts":{"fatal":0,"warning":0},"findings":[],"duration_ms":12}
POST /v1/validate/ublPOST /v1/validate/ciiFull XSD + Schematron validation against EN 16931, Peppol BIS, XRechnung, RO_CIUS and BR-FR. Structured findings with rule IDs — free, no signup, no key.
POST /v1/validate/ubl/reportThe same check, rendered as a printable PDF: a VALID/INVALID banner and a findings table. Billable, unlike the JSON endpoint above.
POST /v1/pdfa/validateChecks any PDF against PDF/A-3 with veraPDF, the reference validator built for the PDF Association — free, like invoice validation.
Convert & Render
Move an invoice between syntaxes, or turn it into something a person can actually read.
POST /v1/convert/{source}-to-{target}Eight directions across UBL, CII, XRechnung and Factur-X. Lossless-or-rejected: anything that can't convert cleanly comes back as a 422 with the exact reason, never a silently degraded invoice.
POST /v1/render/pdfPOST /v1/render/htmlInvoice XML in, a readable PDF or HTML page out — the official KoSIT visualization stylesheets, the same view portals need when a customer receives an XML they can't open.
Extract & Embed
Get the machine-readable data back out of a PDF — or put it in.
POST /v1/extract/xmlReads the XML attachment that's actually inside a Factur-X/ZUGFeRD PDF and returns it — deterministic, never reconstructed or guessed.
POST /v1/extract/attachmentsLists every embedded file in a PDF, not only the invoice XML — supporting documents included (BG-24).
POST /v1/generate/facturx/embedYour branded invoice PDF plus the invoice JSON, combined into a Factur-X/PDF/A-3 with the compliant XML embedded inside. Keep your design, gain the compliance.
Ready to call it yourself?
Every operation above is one HTTP call away — grab a key, or read the full reference first.