{"openapi":"3.1.0","info":{"title":"EU e-Invoicing API","description":"Generate and validate EN 16931 electronic invoices (UBL / Peppol BIS 3.0 / XRechnung 3.0). Deterministic, fast, always on current official validation artefacts.","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/generate/ubl":{"post":{"summary":"Generate","operationId":"generate_v1_generate_ubl_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"peppol","title":"Profile"}},{"name":"validate","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Validate"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Invoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/cii":{"post":{"summary":"Generate Cii Endpoint","operationId":"generate_cii_endpoint_v1_generate_cii_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"en16931","title":"Profile"}},{"name":"validate","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Validate"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Invoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/facturx":{"post":{"summary":"Generate Facturx Endpoint","description":"Factur-X EN 16931: our minimal visual PDF + embedded CII XML.\n(Embedding into a client-supplied PDF: separate multipart endpoint, TODO.)","operationId":"generate_facturx_endpoint_v1_generate_facturx_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Invoice"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/facturapa":{"post":{"summary":"Generate Facturapa Endpoint","description":"Italy FatturaPA (SDI) XML. Body: {\"invoice\": <canonical model>,\n\"extras\": {trasmittente_id_codice, progressivo_invio, ...}} - see\ndocs/API.md. Scope: TD01/TD04 (auto from type_code 380/381) + TD05\n(explicit extras.tipo_documento); Natura for EXEMPT/INTRA_COMMUNITY/\nEXPORT/REVERSE_CHARGE/OUT_OF_SCOPE lines at vat_rate=0; optional\nritenuta/bollo/cassa previdenziale. Unsupported combinations get 422\nwith details, never approximated.","operationId":"generate_facturapa_endpoint_v1_generate_facturapa_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/orderx":{"post":{"summary":"Generate Orderx Endpoint","description":"Order-X Basic (CII-family purchase order XML) - NOT an invoice, see\ndocs/API.md for the Order model (id/issue_date/currency/buyer/seller/\nlines - no VAT breakdown or payment terms, those are invoice\nconcepts).","operationId":"generate_orderx_endpoint_v1_generate_orderx_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Order"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generate/facturx/embed":{"post":{"summary":"Embed Facturx Endpoint","description":"Factur-X from YOUR PDF: keep your design, gain compliance.\n\nMultipart form: `invoice` = canonical-model JSON, `pdf` = the visual PDF.\nReturns the same PDF upgraded to PDF/A-3 with the EN 16931 CII XML\nembedded (factur-x.xml) - ready for Chorus Pro / French & German B2B.","operationId":"embed_facturx_endpoint_v1_generate_facturx_embed_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_embed_facturx_endpoint_v1_generate_facturx_embed_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdfa/convert":{"post":{"summary":"Pdfa Convert Endpoint","description":"Any PDF -> PDF/A-3b (sRGB output intent), with optional embedded\nfiles (AFRelationship: Data/Source/Alternative/Supplement/Unspecified).\nThe e-invoicing archival combo - convert + embed - in one call.","operationId":"pdfa_convert_endpoint_v1_pdfa_convert_post","parameters":[{"name":"relationship","in":"query","required":false,"schema":{"type":"string","default":"Data","title":"Relationship"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_pdfa_convert_endpoint_v1_pdfa_convert_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdfa/validate":{"post":{"summary":"Pdfa Validate Endpoint","description":"PDF/A validation with veraPDF (free tier, like invoice validation).\nBody: the PDF, raw. flavour: auto|1a|1b|2a|2b|2u|3a|3b|3u|4|4e|4f.","operationId":"pdfa_validate_endpoint_v1_pdfa_validate_post","parameters":[{"name":"flavour","in":"query","required":false,"schema":{"type":"string","default":"auto","title":"Flavour"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pdfa/consistency":{"post":{"summary":"Pdfa Consistency Endpoint","description":"Factur-X hybrid check: does the embedded CII XML agree with the\nPDF's visible text (invoice id, payable amount, currency, issue date)?\nCatches drift from editing the PDF or the XML separately. Body: the\nFactur-X PDF, raw. Billable.","operationId":"pdfa_consistency_endpoint_v1_pdfa_consistency_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/convert/ubl-to-cii":{"post":{"summary":"Convert Ubl To Cii","description":"UBL 2.1 Invoice -> CII D16B. Lossless or rejected (422 with details).","operationId":"convert_ubl_to_cii_v1_convert_ubl_to_cii_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"en16931","title":"Profile"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/convert/cii-to-ubl":{"post":{"summary":"Convert Cii To Ubl","description":"CII D16B -> UBL 2.1 Invoice. Lossless or rejected (422 with details).","operationId":"convert_cii_to_ubl_v1_convert_cii_to_ubl_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"en16931","title":"Profile"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/render/html":{"post":{"summary":"Render Html Endpoint","description":"Invoice XML (UBL/CII, auto-detected) -> human-readable HTML.\n\nOfficial KoSIT visualization stylesheets; renders the full EN 16931\nmodel including allowances/charges. Labels: lang=en|de.","operationId":"render_html_endpoint_v1_render_html_post","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/render/pdf":{"post":{"summary":"Render Pdf Endpoint","description":"Invoice XML (UBL/CII, auto-detected) -> PDF.\n\nstyle=compact (default): classic one-page business invoice.\nstyle=kosit: the official KoSIT visualization (auditor's full-form\nview, multi-page). Labels: lang=en|de.","operationId":"render_pdf_endpoint_v1_render_pdf_post","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang"}},{"name":"style","in":"query","required":false,"schema":{"type":"string","default":"compact","title":"Style"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validate/ubl":{"post":{"summary":"Validate","operationId":"validate_v1_validate_ubl_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"peppol","title":"Profile"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validate/cii":{"post":{"summary":"Validate Cii Endpoint","operationId":"validate_cii_endpoint_v1_validate_cii_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"en16931","title":"Profile"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validate/facturapa":{"post":{"summary":"Validate Facturapa Endpoint","description":"XSD-structural validation only - see validate_facturapa() docstring:\nno official Schematron-equivalent business-rule set exists to vendor\nfor FatturaPA (unlike EN16931/Peppol/XRechnung/BR-FR).","operationId":"validate_facturapa_endpoint_v1_validate_facturapa_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/validate/orderx":{"post":{"summary":"Validate Orderx Endpoint","description":"Order-X Basic: full XSD + official schematron business-rule\nvalidation (bundled with the factur-x dependency).","operationId":"validate_orderx_endpoint_v1_validate_orderx_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/repair/ubl":{"post":{"summary":"Repair Ubl Endpoint","description":"Best-effort auto-repair: fixes non-ISO date formats and totals that\ndon't add up (line items are trusted, header totals are recalculated\nfrom them), then re-validates. Never invents missing business data -\nthose stay as findings in `report`. Billable, unlike plain /validate.","operationId":"repair_ubl_endpoint_v1_repair_ubl_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"peppol","title":"Profile"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/repair/cii":{"post":{"summary":"Repair Cii Endpoint","description":"CII equivalent of /v1/validate/ubl/repair. CII dates are already\nformat=102 (YYYYMMDD) or rejected cleanly by the parser, so only the\ntotals-recalculation fix applies here.","operationId":"repair_cii_endpoint_v1_repair_cii_post","parameters":[{"name":"profile","in":"query","required":false,"schema":{"type":"string","default":"en16931","title":"Profile"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"x-rapidapi-proxy-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Rapidapi-Proxy-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_embed_facturx_endpoint_v1_generate_facturx_embed_post":{"properties":{"invoice":{"type":"string","title":"Invoice","description":"Invoice as JSON (canonical model)"},"pdf":{"type":"string","contentMediaType":"application/octet-stream","title":"Pdf","description":"Your branded invoice PDF"}},"type":"object","required":["invoice","pdf"],"title":"Body_embed_facturx_endpoint_v1_generate_facturx_embed_post"},"Body_pdfa_convert_endpoint_v1_pdfa_convert_post":{"properties":{"pdf":{"type":"string","contentMediaType":"application/octet-stream","title":"Pdf","description":"PDF to convert to PDF/A-3b"},"attachments":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Attachments","default":[]}},"type":"object","required":["pdf"],"title":"Body_pdfa_convert_endpoint_v1_pdfa_convert_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}