Not included yet
Self-service signup, billing plans, ANAF submission, and persistence of submitted invoices remain out of scope.
Call the live demo’s Romania-first validation engine and convert canonical invoices over versioned HTTP. Validate UBL 2.1 Invoice or CreditNote XML, or send canonical invoice JSON and receive UBL XML when the generated document passes every pinned check.
Both POST /api/v1/preflight and POST /api/v1/convert require a valid API key on every request.
Authorization: Bearer <key>. Treat the key like a password; do not embed it in public pages or client-side code.429 with a Retry-After header (seconds until the window resets).{"error": {"code": "AUTH-REQUIRED", "message": "…"}}.{"error": {"code": "RATE-LIMIT", "message": "…"}} plus Retry-After.The browser demo at /demo/ does not require a key. It uses the same validator under a separate limit of 20 requests per 60-second window from your network address.
Content-Type: application/xml or text/xml.verdict (valid, invalid, or incomplete), per-stage stages, findings, optional summary, optional buyer_identifier_kind, and a boolean truncated indicating that findings were omitted.200 valid, 422 invalid, 400 / 413 / 415 client errors, 401 auth errors, 429 rate limits, 503 when the engine cannot finish (never treated as success).Each stages entry has stage and outcome (passed or failed).
Only completed stages appear; stage outcomes account for all findings even when the findings list is truncated.
Each finding has rule_id, severity, stage, location, and message.
The optional summary contains the parsed canonical model using Python field names.
Client errors use {"error": {"code": "...", "message": "..."}} instead of the validation response.
400 covers empty bodies, invalid UTF-8, malformed or unsafe XML, unsupported UBL roots, and excessive element counts; 413 covers oversized bodies; 415 covers missing or unsupported content types.
Unsupported HTTP methods return 405 without the JSON error contract.
Responses use Cache-Control: no-store. XML is processed in memory only; it is not written to disk or logged as invoice content.
Bundled fictional sample valid.xml - same invoice as the demo’s passing scenario.
curl -sS -X POST 'https://einvoice.adrianprofir.com/api/v1/preflight' \ -H 'Authorization: Bearer <your-api-key>' \ -H 'Content-Type: application/xml' \ --data-binary @invoices/samples/valid.xml
model_version EN 16931-1:2017), UTF-8, at most 256 KiB. Content-Type: application/json.Content-Type: application/xml; charset=utf-8 preserving the input CustomizationID (BG-2.BT-24).verdict invalid or incomplete and the same finding shape as pre-flight.200 valid UBL returned, 422 generated XML failed validation, 503 when the engine cannot finish, 400 invalid canonical JSON or render error, 413 / 415 as above, plus the shared auth and rate-limit codes.Malformed JSON, unknown terms, or missing required business fields return 400 with INPUT-MODEL. Unsupported UBL bindings or XML-incompatible values also return 400; OUTPUT-SIZE indicates that the generated document exceeds the conservative 256 KiB construction budget or the final XML size limit.
Request body: canonical JSON with BT/BG keys and model_version EN 16931-1:2017.
See the field glossary in canonical model glossary.
Download a fictional worked example as a starting point:
b2b_invoice.json (invoice) or
credit_note.json (credit note).
You can also POST bundled valid.xml to pre-flight and reuse the summary object from the JSON response as the convert body (same shape the model accepts).
curl -sS -X POST 'https://einvoice.adrianprofir.com/api/v1/convert' \ -H 'Authorization: Bearer <your-api-key>' \ -H 'Content-Type: application/json' \ --data-binary @my-canonical-invoice.json
Same safety as the demo
Subprocess isolation with the same wall-clock and CPU limits, DOCTYPE and external entity rejection, local XSD imports only, and disabled Saxon URI access. CSRF protection applies to the HTML demo form only, not these JSON endpoints.
Self-service signup, billing plans, ANAF submission, and persistence of submitted invoices remain out of scope.
Prefer a browser walkthrough first? Open the live validator with bundled samples and a readable summary layout.